@reshape-biotech/design-system 2.3.0 → 2.3.1

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.
@@ -4,7 +4,7 @@
4
4
 
5
5
  export type CheckboxProps = CheckboxRootProps;
6
6
 
7
- let { checked = $bindable(false), onCheckedChange, ...props }: CheckboxProps = $props();
7
+ let { checked = $bindable(false), onCheckedChange, name, ...props }: CheckboxProps = $props();
8
8
  </script>
9
9
 
10
10
  <Checkbox.Root bind:checked {onCheckedChange} {...props}>
@@ -7,6 +7,7 @@
7
7
  value: string;
8
8
  label: string;
9
9
  iconName?: IconName | string;
10
+ disabled?: boolean;
10
11
  };
11
12
 
12
13
  interface Props {
@@ -47,17 +48,19 @@
47
48
  {#if item.iconName}
48
49
  <Icon iconName={item.iconName as IconName} />
49
50
  {/if}
50
- <span>{item.label}</span>
51
- <IconButton
52
- type="button"
53
- aria-label={`Remove ${item.label}`}
54
- onclick={() => onRemoveItem(item.value)}
55
- size="xs"
56
- variant="transparent"
57
- class="text-primary focus:outline-none"
58
- >
59
- <Icon iconName="X" />
60
- </IconButton>
51
+ <span class:text-secondary={item.disabled}>{item.label}</span>
52
+ {#if !item.disabled}
53
+ <IconButton
54
+ type="button"
55
+ aria-label={`Remove ${item.label}`}
56
+ onclick={() => onRemoveItem(item.value)}
57
+ size="xs"
58
+ variant="transparent"
59
+ class="text-primary focus:outline-none"
60
+ >
61
+ <Icon iconName="X" />
62
+ </IconButton>
63
+ {/if}
61
64
  </div>
62
65
  {/if}
63
66
  {/each}
@@ -3,6 +3,7 @@ type ItemType = {
3
3
  value: string;
4
4
  label: string;
5
5
  iconName?: IconName | string;
6
+ disabled?: boolean;
6
7
  };
7
8
  interface Props {
8
9
  selectedValues: string[];
@@ -86,7 +86,7 @@
86
86
  <Input
87
87
  bind:value={() => getStringValue(), (v) => setNumericValue(v)}
88
88
  placeholder={String(placeholder)}
89
- type={'text'}
89
+ type={'number'}
90
90
  inputmode={'decimal'}
91
91
  pattern={config?.schema?.type === 'integer' ? '-?\\d*' : '-?\\d*\\.?\\d*'}
92
92
  {readonly}
@@ -10,9 +10,13 @@
10
10
 
11
11
  let { children, class: className = '', currentStep }: Props = $props();
12
12
 
13
- setContext('STEPPER_CONTEXT', {
14
- currentStep,
13
+ const stepperContext = $state({
14
+ get currentStep() {
15
+ return currentStep;
16
+ },
15
17
  });
18
+
19
+ setContext('STEPPER_CONTEXT', stepperContext);
16
20
  </script>
17
21
 
18
22
  <div class="flex w-full flex-col gap-3 {className}" role="progressbar">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reshape-biotech/design-system",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build",