mertani-web-toolkit 0.1.24 → 0.1.26

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.
@@ -8,6 +8,7 @@
8
8
  font-weight: 500;
9
9
  line-height: 1;
10
10
  font-family: 'Inter', sans-serif;
11
+ box-shadow: 0px 2px 6px rgba(15,23,42,0.08);
11
12
  }
12
13
  .storybook-button:hover {
13
14
  opacity: 0.8;
@@ -16,8 +17,8 @@
16
17
  opacity: 0.6;
17
18
  }
18
19
  .storybook-button--primary {
19
- background-color: var(--background-color, #f79b09);
20
- border: 1px solid var(--border-color, var(--background-color, #f79b09));
20
+ background-color: var(--background-color, #ffa000);
21
+ border: 1px solid var(--border-color, var(--background-color, #ffa000));
21
22
  color: var(--text-color, white);
22
23
  }
23
24
  .storybook-button--primary:disabled {
@@ -37,9 +38,9 @@
37
38
  cursor: not-allowed;
38
39
  }
39
40
  .storybook-button--outline {
40
- border: 1px solid var(--border-color, #f79b09);
41
+ border: 1px solid var(--border-color, #ffa000);
41
42
  background-color: transparent;
42
- color: var(--text-color, #f79b09);
43
+ color: var(--text-color, #ffa000);
43
44
  }
44
45
  .storybook-button--outline:disabled {
45
46
  border: 1px solid #a3a6b7;
@@ -8,11 +8,11 @@
8
8
  height?: number | string;
9
9
  color?: string;
10
10
  style?: string;
11
- action?: () => void;
11
+ onclick?: () => void;
12
12
  opacity?: number;
13
13
  }
14
14
 
15
- const { name, width, height, color, style, action, opacity }: IconProps = $props();
15
+ const { name, width, height, color, style, onclick, opacity }: IconProps = $props();
16
16
 
17
17
  const IconComponent = $derived(iconMap[name]);
18
18
 
@@ -49,8 +49,8 @@
49
49
  });
50
50
 
51
51
  function handleClick() {
52
- if (action) {
53
- action();
52
+ if (onclick) {
53
+ onclick();
54
54
  }
55
55
  }
56
56
  </script>
@@ -59,12 +59,12 @@
59
59
  {@const Component = IconComponent as any}
60
60
  <div
61
61
  class="icon-wrapper"
62
- class:icon-clickable={action !== undefined}
62
+ class:icon-clickable={onclick !== undefined}
63
63
  style={combinedStyles()}
64
- onclick={action ? handleClick : undefined}
65
- role={action ? 'button' : undefined}
64
+ onclick={onclick ? handleClick : undefined}
65
+ role={onclick ? 'button' : undefined}
66
66
  onkeydown={(e) => {
67
- if (action && (e.key === 'Enter' || e.key === ' ')) {
67
+ if (onclick && (e.key === 'Enter' || e.key === ' ')) {
68
68
  e.preventDefault();
69
69
  handleClick();
70
70
  }
@@ -90,7 +90,9 @@
90
90
 
91
91
  .icon-wrapper.icon-clickable {
92
92
  cursor: pointer;
93
- transition: opacity 0.2s ease, transform 0.2s ease;
93
+ transition:
94
+ opacity 0.2s ease,
95
+ transform 0.2s ease;
94
96
  }
95
97
 
96
98
  .icon-wrapper.icon-clickable:hover {
@@ -5,7 +5,7 @@ interface IconProps {
5
5
  height?: number | string;
6
6
  color?: string;
7
7
  style?: string;
8
- action?: () => void;
8
+ onclick?: () => void;
9
9
  opacity?: number;
10
10
  }
11
11
  declare const Icon: import("svelte").Component<IconProps, {}, "">;
@@ -7,14 +7,14 @@
7
7
  iconColor = '#212529',
8
8
  style,
9
9
  opacity,
10
- action
10
+ onclick
11
11
  } = $props<{
12
12
  iconWidth?: number | string;
13
13
  iconHeight?: number | string;
14
14
  iconColor?: string;
15
15
  style?: string;
16
16
  opacity?: number;
17
- action?: (iconName: string) => void;
17
+ onclick?: (iconName: string) => void;
18
18
  }>();
19
19
 
20
20
  // Daftar semua icon - otomatis dari iconMap
@@ -56,8 +56,8 @@
56
56
  });
57
57
 
58
58
  function handleIconClick(iconName: string) {
59
- if (action) {
60
- action(iconName);
59
+ if (onclick) {
60
+ onclick(iconName);
61
61
  }
62
62
  }
63
63
  </script>
@@ -78,12 +78,12 @@
78
78
  {@const IconComponent = icon.component as any}
79
79
  <div
80
80
  class="icon-item"
81
- class:icon-clickable={action !== undefined}
81
+ class:icon-clickable={onclick !== undefined}
82
82
  style={combinedStyles()}
83
- onclick={action ? () => handleIconClick(icon.name) : undefined}
84
- role={action ? 'button' : undefined}
83
+ onclick={onclick ? () => handleIconClick(icon.name) : undefined}
84
+ role={onclick ? 'button' : undefined}
85
85
  onkeydown={(e) => {
86
- if (action && (e.key === 'Enter' || e.key === ' ')) {
86
+ if (onclick && (e.key === 'Enter' || e.key === ' ')) {
87
87
  e.preventDefault();
88
88
  handleIconClick(icon.name);
89
89
  }
@@ -156,7 +156,9 @@
156
156
 
157
157
  .icon-item.icon-clickable {
158
158
  cursor: pointer;
159
- transition: opacity 0.2s ease, transform 0.2s ease;
159
+ transition:
160
+ opacity 0.2s ease,
161
+ transform 0.2s ease;
160
162
  }
161
163
 
162
164
  .icon-item.icon-clickable:hover {
@@ -4,7 +4,7 @@ type $$ComponentProps = {
4
4
  iconColor?: string;
5
5
  style?: string;
6
6
  opacity?: number;
7
- action?: (iconName: string) => void;
7
+ onclick?: (iconName: string) => void;
8
8
  };
9
9
  declare const IconLibrary: import("svelte").Component<$$ComponentProps, {}, "">;
10
10
  type IconLibrary = ReturnType<typeof IconLibrary>;
@@ -54,7 +54,7 @@
54
54
 
55
55
  if (prefix || suffix) {
56
56
  // Ketika ada prefix/suffix, border ada di wrapper
57
- classes += ' border-0 rounded-none bg-transparent';
57
+ classes += ' border-0 rounded-l bg-transparent';
58
58
 
59
59
  // Padding untuk input dengan prefix/suffix
60
60
  if (prefix) {
@@ -127,7 +127,7 @@
127
127
  <input
128
128
  {type}
129
129
  {id}
130
- class={mergedClasses}
130
+ class="px-4 {mergedClasses}"
131
131
  style={customStyle}
132
132
  value={value as any}
133
133
  {placeholder}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mertani-web-toolkit",
3
- "version": "0.1.24",
3
+ "version": "0.1.26",
4
4
  "homepage": "https://storybook.mertani.com/",
5
5
  "scripts": {
6
6
  "dev": "vite dev",