noph-ui 0.7.6 → 0.7.7

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/README.md CHANGED
@@ -56,7 +56,7 @@ Beta (No breaking changes expected)
56
56
 
57
57
  - Buttons
58
58
  - Cards
59
- - Checkbox (Docs missing)
59
+ - Checkbox
60
60
  - Divider
61
61
  - Icon buttons
62
62
  - Lists (Docs missing)
@@ -5,11 +5,12 @@
5
5
  let {
6
6
  indeterminate = $bindable(),
7
7
  checked = $bindable(),
8
+ element = $bindable(),
8
9
  ...attributes
9
10
  }: CheckboxProps = $props()
10
11
  </script>
11
12
 
12
- <div class="np-host">
13
+ <div class={['np-host', attributes.class]} bind:this={element}>
13
14
  <div class="np-container">
14
15
  <label class="np-input-wrapper">
15
16
  <input
@@ -130,7 +131,7 @@
130
131
  visibility: hidden;
131
132
  }
132
133
  .np-background {
133
- background-color: var(--np-color-primary);
134
+ background-color: var(--np-checkbox-selected-container-color, var(--np-color-primary));
134
135
  }
135
136
  .np-background,
136
137
  .np-icon {
@@ -1,4 +1,4 @@
1
1
  import type { CheckboxProps } from './types.ts';
2
- declare const Checkbox: import("svelte").Component<CheckboxProps, {}, "checked" | "indeterminate">;
2
+ declare const Checkbox: import("svelte").Component<CheckboxProps, {}, "element" | "checked" | "indeterminate">;
3
3
  type Checkbox = ReturnType<typeof Checkbox>;
4
4
  export default Checkbox;
@@ -1,2 +1,4 @@
1
1
  import type { HTMLInputAttributes } from 'svelte/elements';
2
- export type CheckboxProps = Omit<HTMLInputAttributes, 'class' | 'type'>;
2
+ export interface CheckboxProps extends Omit<HTMLInputAttributes, 'type'> {
3
+ element?: HTMLElement;
4
+ }
@@ -70,21 +70,26 @@
70
70
  >
71
71
  {/if}
72
72
  {#if icon}
73
- <IconButton
74
- --np-icon-button-icon-color="var(--np-snackbar-text-color, var(--np-color-inverse-on-surface))"
75
- --np-icon-button-container-shape="0"
76
- --np-icon-button-container-height={buttonHeight}
77
- --np-icon-button-container-width="2.5rem"
78
- aria-label="Close"
79
- onclick={onIconClick}
80
- >
81
- {@render icon()}</IconButton
82
- >
73
+ <div class="np-snackbar-icon-container">
74
+ <IconButton
75
+ --np-icon-button-icon-color="var(--np-snackbar-text-color, var(--np-color-inverse-on-surface))"
76
+ --np-icon-button-container-shape="0"
77
+ --np-icon-button-container-height={buttonHeight}
78
+ --np-icon-button-container-width="2.5rem"
79
+ aria-label="Close"
80
+ onclick={onIconClick}
81
+ >
82
+ {@render icon()}</IconButton
83
+ >
84
+ </div>
83
85
  {/if}
84
86
  </div>
85
87
  </div>
86
88
 
87
89
  <style>
90
+ .np-snackbar-icon-container {
91
+ width: 2.75rem;
92
+ }
88
93
  .np-snackbar-supporting-text {
89
94
  font-weight: 400;
90
95
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "noph-ui",
3
- "version": "0.7.6",
3
+ "version": "0.7.7",
4
4
  "license": "MIT",
5
5
  "homepage": "https://noph.dev",
6
6
  "repository": {