@jk-core/components 1.1.6 → 1.1.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jk-core/components",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "type": "module",
5
5
  "main": "./dist/index.umd.cjs",
6
6
  "types": "./dist/index.d.ts",
@@ -41,7 +41,9 @@
41
41
  },
42
42
  "scripts": {
43
43
  "build": "yarn clean && vite build",
44
- "clean": "rm -rf dist",
44
+ "clean:win": "if exist dist rmdir /S /Q dist",
45
+ "clean:unix": "rm -rf dist",
46
+ "clean": "node -e \"require('child_process').execSync(process.platform === 'win32' ? 'npm run clean:win' : 'npm run clean:unix', {stdio: 'inherit'})\"",
45
47
  "lint": "yarn lint:eslint && yarn lint:stylelint",
46
48
  "lint:fix": "yarn lint:eslint --fix && yarn lint:stylelint --fix",
47
49
  "lint:eslint": "eslint src",
@@ -34,6 +34,7 @@ export default function Button({
34
34
  return (
35
35
  <button
36
36
  className={cn({
37
+ [className]: !!className,
37
38
  [styles.button]: true,
38
39
  [styles.button__loading]: isLoading,
39
40
  [styles.button__disabled]: !!disabled,
@@ -41,7 +42,6 @@ export default function Button({
41
42
  [styles.button__secondary]: grade === 'secondary',
42
43
  [styles.button__primary]: grade === 'primary',
43
44
  [styles.button__cancel]: grade === 'cancel',
44
- [className]: !!className,
45
45
  })}
46
46
  type="button"
47
47
  disabled={disabled}
@@ -1,4 +1,5 @@
1
1
  .card {
2
+ position: relative;
2
3
  width: 100%;
3
4
  background-color: var(--white);
4
5
  border-radius: 5px;
@@ -60,7 +60,7 @@ export default function SegmentButton({ width, stretch, option, selected }: Segm
60
60
  <button
61
61
  className={cn({
62
62
  [styles.button]: true,
63
- [styles['button--selected']]: optionIndex === selected,
63
+ [styles['button--selected']]: optionIndex === selectedIndex,
64
64
  })}
65
65
  key={item.text}
66
66
  type="button"