@streamscloud/kit 0.2.0 → 0.2.2

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 (106) hide show
  1. package/dist/styles/_input.scss +98 -0
  2. package/dist/styles/_mixins.scss +2 -2
  3. package/dist/styles/reset.css +1 -1
  4. package/dist/ui/color-picker/cmp.color-picker.svelte +3 -12
  5. package/dist/ui/color-picker/cmp.color-picker.svelte.d.ts +3 -9
  6. package/dist/ui/dialog/cmp.dialog.svelte +1 -1
  7. package/dist/ui/dropdown/cmp.dropdown-item.svelte +93 -0
  8. package/dist/ui/dropdown/cmp.dropdown-item.svelte.d.ts +32 -0
  9. package/dist/ui/dropdown/cmp.dropdown-panel.svelte +29 -0
  10. package/dist/ui/dropdown/cmp.dropdown-panel.svelte.d.ts +18 -0
  11. package/dist/ui/dropdown/cmp.dropdown.svelte +72 -7
  12. package/dist/ui/dropdown/cmp.dropdown.svelte.d.ts +3 -1
  13. package/dist/ui/dropdown/index.d.ts +2 -0
  14. package/dist/ui/dropdown/index.js +2 -0
  15. package/dist/ui/dynamic-component/cmp.dynamic-component.svelte +0 -5
  16. package/dist/ui/dynamic-component/cmp.dynamic-component.svelte.d.ts +2 -8
  17. package/dist/ui/emoji-picker/cmp.emoji-panel.svelte +186 -0
  18. package/dist/ui/emoji-picker/cmp.emoji-panel.svelte.d.ts +21 -0
  19. package/dist/ui/emoji-picker/cmp.emoji-picker.svelte +35 -0
  20. package/dist/ui/emoji-picker/cmp.emoji-picker.svelte.d.ts +15 -0
  21. package/dist/ui/emoji-picker/emoji-list.d.ts +2 -0
  22. package/dist/ui/emoji-picker/emoji-list.js +1754 -0
  23. package/dist/ui/emoji-picker/emoji-picker-localization.d.ts +5 -0
  24. package/dist/ui/emoji-picker/emoji-picker-localization.js +40 -0
  25. package/dist/ui/emoji-picker/index.d.ts +2 -0
  26. package/dist/ui/emoji-picker/index.js +2 -0
  27. package/dist/ui/emoji-picker/types.d.ts +8 -0
  28. package/dist/ui/emoji-picker/types.js +1 -0
  29. package/dist/ui/form-group/cmp.form-group-label.svelte.d.ts +1 -0
  30. package/dist/ui/form-group/cmp.form-group.svelte.d.ts +1 -0
  31. package/dist/ui/icon-text/cmp.icon-text.svelte +0 -9
  32. package/dist/ui/icon-text/cmp.icon-text.svelte.d.ts +4 -9
  33. package/dist/ui/inputs/index.d.ts +6 -0
  34. package/dist/ui/inputs/index.js +5 -0
  35. package/dist/ui/inputs/input/cmp.input-validatable.svelte +57 -0
  36. package/dist/ui/inputs/input/cmp.input-validatable.svelte.d.ts +56 -0
  37. package/dist/ui/inputs/input/cmp.input.svelte +235 -0
  38. package/dist/ui/inputs/input/cmp.input.svelte.d.ts +60 -0
  39. package/dist/ui/inputs/input/index.d.ts +2 -0
  40. package/dist/ui/inputs/input/index.js +2 -0
  41. package/dist/ui/inputs/input-emoji-picker/cmp.input-emoji-picker.svelte +44 -0
  42. package/dist/ui/inputs/input-emoji-picker/cmp.input-emoji-picker.svelte.d.ts +9 -0
  43. package/dist/ui/inputs/input-emoji-picker/index.d.ts +2 -0
  44. package/dist/ui/inputs/input-emoji-picker/index.js +2 -0
  45. package/dist/ui/inputs/input-emoji-picker/input-emoji-picker-container.d.ts +2 -0
  46. package/dist/ui/inputs/input-emoji-picker/input-emoji-picker-container.js +16 -0
  47. package/dist/ui/inputs/numeral-input/cmp.numeral-input-validatable.svelte +55 -0
  48. package/dist/ui/inputs/numeral-input/cmp.numeral-input-validatable.svelte.d.ts +62 -0
  49. package/dist/ui/inputs/numeral-input/cmp.numeral-input.svelte +248 -0
  50. package/dist/ui/inputs/numeral-input/cmp.numeral-input.svelte.d.ts +66 -0
  51. package/dist/ui/inputs/numeral-input/index.d.ts +2 -0
  52. package/dist/ui/inputs/numeral-input/index.js +2 -0
  53. package/dist/ui/inputs/pin-input/cmp.pin-input.svelte +58 -0
  54. package/dist/ui/inputs/pin-input/cmp.pin-input.svelte.d.ts +23 -0
  55. package/dist/ui/inputs/pin-input/index.d.ts +1 -0
  56. package/dist/ui/inputs/pin-input/index.js +1 -0
  57. package/dist/ui/inputs/pin-input/pin-input-generator.d.ts +27 -0
  58. package/dist/ui/inputs/pin-input/pin-input-generator.js +114 -0
  59. package/dist/ui/inputs/rich-text-input/cmp.rich-text-input.svelte +55 -0
  60. package/dist/ui/inputs/rich-text-input/cmp.rich-text-input.svelte.d.ts +43 -0
  61. package/dist/ui/inputs/rich-text-input/index.d.ts +2 -0
  62. package/dist/ui/inputs/rich-text-input/index.js +1 -0
  63. package/dist/ui/inputs/rich-text-input/rich-text-input-localization.d.ts +12 -0
  64. package/dist/ui/inputs/rich-text-input/rich-text-input-localization.js +48 -0
  65. package/dist/ui/inputs/rich-text-input/tinymce-input.svelte +250 -0
  66. package/dist/ui/inputs/rich-text-input/tinymce-input.svelte.d.ts +25 -0
  67. package/dist/ui/inputs/rich-text-input/tinymce.declarations.d.ts +7 -0
  68. package/dist/ui/inputs/rich-text-input/types.d.ts +4 -0
  69. package/dist/ui/inputs/rich-text-input/types.js +1 -0
  70. package/dist/ui/inputs/rich-text-input/validated-link-button.d.ts +3 -0
  71. package/dist/ui/inputs/rich-text-input/validated-link-button.js +78 -0
  72. package/dist/ui/inputs/textarea/cmp.textarea-validatable.svelte +35 -0
  73. package/dist/ui/inputs/textarea/cmp.textarea-validatable.svelte.d.ts +53 -0
  74. package/dist/ui/inputs/textarea/cmp.textarea.svelte +247 -0
  75. package/dist/ui/inputs/textarea/cmp.textarea.svelte.d.ts +57 -0
  76. package/dist/ui/inputs/textarea/index.d.ts +2 -0
  77. package/dist/ui/inputs/textarea/index.js +2 -0
  78. package/dist/ui/media-viewer-dialog/cmp.media-viewer-dialog.svelte.d.ts +2 -0
  79. package/dist/ui/media-viewer-dialog/index.d.ts +2 -1
  80. package/dist/ui/media-viewer-dialog/index.js +4 -2
  81. package/dist/ui/selects/_multiselect.scss +282 -0
  82. package/dist/ui/selects/_singleselect.scss +175 -0
  83. package/dist/ui/selects/cmp.multiselect.svelte +530 -0
  84. package/dist/ui/selects/cmp.multiselect.svelte.d.ts +85 -0
  85. package/dist/ui/selects/cmp.search-multiselect.svelte +532 -0
  86. package/dist/ui/selects/cmp.search-multiselect.svelte.d.ts +67 -0
  87. package/dist/ui/selects/cmp.singleselect.svelte +381 -0
  88. package/dist/ui/selects/cmp.singleselect.svelte.d.ts +78 -0
  89. package/dist/ui/selects/index.d.ts +5 -0
  90. package/dist/ui/selects/index.js +4 -0
  91. package/dist/ui/selects/select-localization.d.ts +6 -0
  92. package/dist/ui/selects/select-localization.js +27 -0
  93. package/dist/ui/selects/types.d.ts +29 -0
  94. package/dist/ui/selects/types.js +1 -0
  95. package/dist/ui/time-ago/cmp.time-ago.svelte +0 -6
  96. package/dist/ui/time-ago/cmp.time-ago.svelte.d.ts +2 -6
  97. package/dist/ui/validatable/_validatable.scss +34 -0
  98. package/dist/ui/validatable/cmp.validatable.svelte +57 -0
  99. package/dist/ui/validatable/cmp.validatable.svelte.d.ts +49 -0
  100. package/dist/ui/validatable/cmp.validation-error.svelte +52 -0
  101. package/dist/ui/validatable/cmp.validation-error.svelte.d.ts +42 -0
  102. package/dist/ui/validatable/index.d.ts +2 -0
  103. package/dist/ui/validatable/index.js +2 -0
  104. package/package.json +31 -5
  105. package/dist/ui/color-picker/cmp.input-stub.svelte +0 -98
  106. package/dist/ui/color-picker/cmp.input-stub.svelte.d.ts +0 -40
@@ -0,0 +1,49 @@
1
+ import type { FormValidationHandler } from '../../core/validation';
2
+ import type { Snippet } from 'svelte';
3
+ declare function $$render<T extends Record<string, unknown>>(): {
4
+ props: {
5
+ /** Field name in the form handler */
6
+ name: keyof T & string;
7
+ /** Form validation handler instance */
8
+ handler: FormValidationHandler<T>;
9
+ /** Show errors even if field was not touched */
10
+ disableTouchedTracking?: boolean;
11
+ children: Snippet;
12
+ };
13
+ exports: {};
14
+ bindings: "";
15
+ slots: {};
16
+ events: {};
17
+ };
18
+ declare class __sveltets_Render<T extends Record<string, unknown>> {
19
+ props(): ReturnType<typeof $$render<T>>['props'];
20
+ events(): ReturnType<typeof $$render<T>>['events'];
21
+ slots(): ReturnType<typeof $$render<T>>['slots'];
22
+ bindings(): "";
23
+ exports(): {};
24
+ }
25
+ interface $$IsomorphicComponent {
26
+ new <T extends Record<string, unknown>>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
27
+ $$bindings?: ReturnType<__sveltets_Render<T>['bindings']>;
28
+ } & ReturnType<__sveltets_Render<T>['exports']>;
29
+ <T extends Record<string, unknown>>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {}): ReturnType<__sveltets_Render<T>['exports']>;
30
+ z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
31
+ }
32
+ /**
33
+ * Wraps a form field and displays validation errors from a FormValidationHandler.
34
+ *
35
+ * ### CSS Custom Properties
36
+ * | Property | Description | Default |
37
+ * |---|---|---|
38
+ * | `--sc-kit--validatable--error--color` | Error text and accent color | destructive-500 |
39
+ * | `--sc-kit--validatable--error--position` | Error message positioning | `absolute` |
40
+ * | `--sc-kit--validatable--error--left` | Error left offset | `0` |
41
+ * | `--sc-kit--validatable--error--right` | Error right offset | `0` |
42
+ * | `--sc-kit--validatable--margin-bottom` | Bottom margin for spacing | `1.1em` |
43
+ * | `--sc-kit--validatable--margin-right` | Right margin for spacing | `0` |
44
+ * | `--sc-kit--validatable--display` | Display mode | `block` |
45
+ * | `--sc-kit--validatable--width` | Container width | `auto` |
46
+ */
47
+ declare const Cmp: $$IsomorphicComponent;
48
+ type Cmp<T extends Record<string, unknown>> = InstanceType<typeof Cmp<T>>;
49
+ export default Cmp;
@@ -0,0 +1,52 @@
1
+ <script lang="ts" generics="T extends Record<string, unknown>">let { name, validationResult, children } = $props();
2
+ const showErrors = $derived(validationResult?.errors[name]);
3
+ export {};
4
+ </script>
5
+
6
+ <div class="validatable" class:validatable--errored={showErrors}>
7
+ {@render children()}
8
+ {#if showErrors}
9
+ <small class="validatable__error">{validationResult!.errors[name]}</small>
10
+ {/if}
11
+ </div>
12
+
13
+ <!--
14
+ @component
15
+ Wraps a form field and displays validation errors from a FormValidateResult object.
16
+
17
+ ### CSS Custom Properties
18
+ | Property | Description | Default |
19
+ |---|---|---|
20
+ | `--sc-kit--validatable--error--color` | Error text and accent color | destructive-500 |
21
+ | `--sc-kit--validatable--error--position` | Error message positioning | `absolute` |
22
+ | `--sc-kit--validatable--margin-bottom` | Bottom margin for spacing | `1.1em` |
23
+ -->
24
+
25
+ <style>.validatable {
26
+ --_validatable--error--color: var(--sc-kit--validatable--error--color, #e71d36);
27
+ --_validatable--error--position: var(--sc-kit--validatable--error--position, absolute);
28
+ --_validatable--error--left: var(--sc-kit--validatable--error--left, 0);
29
+ --_validatable--error--right: var(--sc-kit--validatable--error--right, 0);
30
+ --_validatable--margin-bottom: var(--sc-kit--validatable--margin-bottom, 1.1em);
31
+ --_validatable--margin-right: var(--sc-kit--validatable--margin-right, 0);
32
+ --_validatable--display: var(--sc-kit--validatable--display, block);
33
+ --_validatable--width: var(--sc-kit--validatable--width, auto);
34
+ position: relative;
35
+ margin-bottom: var(--_validatable--margin-bottom);
36
+ margin-right: var(--_validatable--margin-right);
37
+ display: var(--_validatable--display);
38
+ width: var(--_validatable--width);
39
+ }
40
+ .validatable--errored {
41
+ --_input--explicit-shadow-color: var(--_validatable--error--color);
42
+ }
43
+ .validatable__error {
44
+ position: var(--_validatable--error--position);
45
+ top: calc(100% + 0.1em);
46
+ left: var(--_validatable--error--left);
47
+ right: var(--_validatable--error--right);
48
+ display: block;
49
+ color: var(--_validatable--error--color);
50
+ font-size: 0.7rem;
51
+ font-weight: 400;
52
+ }</style>
@@ -0,0 +1,42 @@
1
+ import type { FormValidateResult } from '../../core/validation';
2
+ import type { Snippet } from 'svelte';
3
+ declare function $$render<T extends Record<string, unknown>>(): {
4
+ props: {
5
+ /** Field name in the validation result */
6
+ name: keyof T & string;
7
+ /** Validation result object containing error messages */
8
+ validationResult?: FormValidateResult<T>;
9
+ children: Snippet;
10
+ };
11
+ exports: {};
12
+ bindings: "";
13
+ slots: {};
14
+ events: {};
15
+ };
16
+ declare class __sveltets_Render<T extends Record<string, unknown>> {
17
+ props(): ReturnType<typeof $$render<T>>['props'];
18
+ events(): ReturnType<typeof $$render<T>>['events'];
19
+ slots(): ReturnType<typeof $$render<T>>['slots'];
20
+ bindings(): "";
21
+ exports(): {};
22
+ }
23
+ interface $$IsomorphicComponent {
24
+ new <T extends Record<string, unknown>>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
25
+ $$bindings?: ReturnType<__sveltets_Render<T>['bindings']>;
26
+ } & ReturnType<__sveltets_Render<T>['exports']>;
27
+ <T extends Record<string, unknown>>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {}): ReturnType<__sveltets_Render<T>['exports']>;
28
+ z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
29
+ }
30
+ /**
31
+ * Wraps a form field and displays validation errors from a FormValidateResult object.
32
+ *
33
+ * ### CSS Custom Properties
34
+ * | Property | Description | Default |
35
+ * |---|---|---|
36
+ * | `--sc-kit--validatable--error--color` | Error text and accent color | destructive-500 |
37
+ * | `--sc-kit--validatable--error--position` | Error message positioning | `absolute` |
38
+ * | `--sc-kit--validatable--margin-bottom` | Bottom margin for spacing | `1.1em` |
39
+ */
40
+ declare const Cmp: $$IsomorphicComponent;
41
+ type Cmp<T extends Record<string, unknown>> = InstanceType<typeof Cmp<T>>;
42
+ export default Cmp;
@@ -0,0 +1,2 @@
1
+ export { default as Validatable } from './cmp.validatable.svelte';
2
+ export { default as ValidationError } from './cmp.validation-error.svelte';
@@ -0,0 +1,2 @@
1
+ export { default as Validatable } from './cmp.validatable.svelte';
2
+ export { default as ValidationError } from './cmp.validation-error.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/kit",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "author": "StreamsCloud",
5
5
  "repository": {
6
6
  "type": "git",
@@ -105,10 +105,6 @@
105
105
  "types": "./dist/ui/dialog/index.d.ts",
106
106
  "svelte": "./dist/ui/dialog/index.js"
107
107
  },
108
- "./ui/form-group": {
109
- "types": "./dist/ui/form-group/index.d.ts",
110
- "svelte": "./dist/ui/form-group/index.js"
111
- },
112
108
  "./ui/dropdown": {
113
109
  "types": "./dist/ui/dropdown/index.d.ts",
114
110
  "svelte": "./dist/ui/dropdown/index.js"
@@ -117,6 +113,14 @@
117
113
  "types": "./dist/ui/dynamic-component/index.d.ts",
118
114
  "svelte": "./dist/ui/dynamic-component/index.js"
119
115
  },
116
+ "./ui/emoji-picker": {
117
+ "types": "./dist/ui/emoji-picker/index.d.ts",
118
+ "svelte": "./dist/ui/emoji-picker/index.js"
119
+ },
120
+ "./ui/form-group": {
121
+ "types": "./dist/ui/form-group/index.d.ts",
122
+ "svelte": "./dist/ui/form-group/index.js"
123
+ },
120
124
  "./ui/html-block": {
121
125
  "types": "./dist/ui/html-block/index.d.ts",
122
126
  "svelte": "./dist/ui/html-block/index.js"
@@ -141,6 +145,10 @@
141
145
  "types": "./dist/ui/infinite-scrolling/index.d.ts",
142
146
  "svelte": "./dist/ui/infinite-scrolling/index.js"
143
147
  },
148
+ "./ui/inputs": {
149
+ "types": "./dist/ui/inputs/index.d.ts",
150
+ "svelte": "./dist/ui/inputs/index.js"
151
+ },
144
152
  "./ui/line-clamp": {
145
153
  "types": "./dist/ui/line-clamp/index.d.ts",
146
154
  "svelte": "./dist/ui/line-clamp/index.js"
@@ -185,6 +193,10 @@
185
193
  "types": "./dist/ui/seek-bar/index.d.ts",
186
194
  "svelte": "./dist/ui/seek-bar/index.js"
187
195
  },
196
+ "./ui/selects": {
197
+ "types": "./dist/ui/selects/index.d.ts",
198
+ "svelte": "./dist/ui/selects/index.js"
199
+ },
188
200
  "./ui/swipe-indicator": {
189
201
  "types": "./dist/ui/swipe-indicator/index.d.ts",
190
202
  "svelte": "./dist/ui/swipe-indicator/index.js"
@@ -193,6 +205,10 @@
193
205
  "types": "./dist/ui/time-ago/index.d.ts",
194
206
  "svelte": "./dist/ui/time-ago/index.js"
195
207
  },
208
+ "./ui/validatable": {
209
+ "types": "./dist/ui/validatable/index.d.ts",
210
+ "svelte": "./dist/ui/validatable/index.js"
211
+ },
196
212
  "./ui/video": {
197
213
  "types": "./dist/ui/video/index.d.ts",
198
214
  "svelte": "./dist/ui/video/index.js"
@@ -228,15 +244,20 @@
228
244
  "@fluentui/svg-icons": "^1.1.318",
229
245
  "@popperjs/core": "^2.11.8",
230
246
  "@urql/core": "^5.2.0 || ^6.0.0",
247
+ "cleave-zen": "^0.0.17",
231
248
  "colord": "^2.9.3",
232
249
  "cropperjs": "^2.1.0",
233
250
  "dequal": "^2.0.0",
234
251
  "dompurify": "^3.3.0",
252
+ "fuse.js": "^7.1.0",
235
253
  "mime": "^4.1.0",
236
254
  "nanoid": "^5.1.6",
237
255
  "rfdc": "^1.4.1",
238
256
  "svelte": "^5.50.0",
239
257
  "svelte-awesome-color-picker": "^4.1.1",
258
+ "svelte-dnd-action": "^0.9.69",
259
+ "svelte-select": "^5.8.3",
260
+ "tinymce": "^5.10.7",
240
261
  "wheel-gestures": "^2.2.48",
241
262
  "yup": "^1.6.1"
242
263
  },
@@ -251,6 +272,7 @@
251
272
  "@types/node": "^25.2.3",
252
273
  "@urql/core": "^6.0.1",
253
274
  "autoprefixer": "^10.4.24",
275
+ "cleave-zen": "^0.0.17",
254
276
  "colord": "^2.9.3",
255
277
  "cropperjs": "^2.1.0",
256
278
  "dequal": "^2.0.3",
@@ -265,6 +287,7 @@
265
287
  "eslint-plugin-promise": "^7.2.1",
266
288
  "eslint-plugin-svelte": "^3.15.0",
267
289
  "eslint-plugin-unused-imports": "^4.4.1",
290
+ "fuse.js": "^7.1.0",
268
291
  "globals": "^17.3.0",
269
292
  "mime": "^4.1.0",
270
293
  "nanoid": "^5.1.6",
@@ -276,8 +299,11 @@
276
299
  "svelte": "^5.51.0",
277
300
  "svelte-awesome-color-picker": "^4.1.1",
278
301
  "svelte-check": "^4.4.0",
302
+ "svelte-dnd-action": "^0.9.69",
279
303
  "svelte-preprocess": "^6.0.3",
304
+ "svelte-select": "^5.8.3",
280
305
  "svelte-sonner": "^1.0.7",
306
+ "tinymce": "^5.10.7",
281
307
  "typescript": "^5.9.3",
282
308
  "typescript-eslint": "^8.55.0",
283
309
  "vite": "^7.3.1",
@@ -1,98 +0,0 @@
1
- <script lang="ts">import { untrack } from 'svelte';
2
- // inert and on are accepted for Input-compatibility but unused in the stub
3
- let { value, placeholder = '', inert, icon, clearButton, on } = $props();
4
- untrack(() => void inert);
5
- untrack(() => void on);
6
- </script>
7
-
8
- <div class="input-stub">
9
- {#if icon}
10
- <span class="input-stub__icon">
11
- {@render icon()}
12
- </span>
13
- {/if}
14
- <span class="input-stub__text" class:input-stub__text--placeholder={!value}>
15
- {value || placeholder}
16
- </span>
17
- {#if clearButton}
18
- <span class="input-stub__action">
19
- {@render clearButton()}
20
- </span>
21
- {/if}
22
- </div>
23
-
24
- <!--
25
- @component
26
- Minimal input-field emulation for use inside ColorPicker.
27
- Reads `--sc-kit--input--*` CSS variables set by the parent. Will be replaced by a real Input component when available.
28
-
29
- ### Props
30
- | Prop | Type | Default | Description |
31
- |---|---|---|---|
32
- | `value` | `string` | — | Displayed text |
33
- | `placeholder` | `string` | `''` | Placeholder when value is empty |
34
- | `inert` | `boolean` | — | Reserved for future Input compatibility |
35
- | `on` | `Record<string, never>` | — | Reserved for future Input compatibility |
36
- | `icon` | `Snippet` | — | Left icon slot |
37
- | `clearButton` | `Snippet` | — | Right action slot |
38
-
39
- ### CSS Custom Properties
40
- | Property | Description | Default |
41
- |---|---|---|
42
- | `--sc-kit--input--height` | Container height | `2rem` |
43
- | `--sc-kit--input--background` | Background color | light-dark white/dark |
44
- | `--sc-kit--input--border-color` | Border color | light-dark neutral |
45
- | `--sc-kit--input--border-radius` | Border radius | `0.25rem` |
46
- | `--sc-kit--input--text--font-size` | Text font size | `0.875rem` |
47
- | `--sc-kit--input--text--color` | Text color | light-dark gray/white |
48
- | `--sc-kit--input--icon--size` | Icon size | `1rem` |
49
- | `--sc-kit--input--icon--color` | Icon color | inherited |
50
- | `--sc-kit--input--padding--hor` | Horizontal padding | `0.625rem` |
51
- | `--sc-kit--input--cursor--inert` | Cursor when inert | `default` |
52
- -->
53
-
54
- <style>.input-stub {
55
- --_input--height: var(--sc-kit--input--height, 2rem);
56
- --_input--background: var(--sc-kit--input--background, light-dark(#ffffff, #222222));
57
- --_input--border-color: var(--sc-kit--input--border-color, light-dark(#d1d5db, #383838));
58
- --_input--border-radius: var(--sc-kit--input--border-radius, 0.25rem);
59
- --_input--text-font-size: var(--sc-kit--input--text--font-size, 0.875rem);
60
- --_input--text-color: var(--sc-kit--input--text--color, light-dark(#2e2e2e, #ffffff));
61
- --_input--icon-size: var(--sc-kit--input--icon--size, 1rem);
62
- --_input--icon-color: var(--sc-kit--input--icon--color);
63
- --_input--padding-hor: var(--sc-kit--input--padding--hor, 0.625rem);
64
- --_input--cursor: var(--sc-kit--input--cursor--inert, default);
65
- display: flex;
66
- align-items: center;
67
- height: var(--_input--height);
68
- background: var(--_input--background);
69
- border: 1px solid var(--_input--border-color);
70
- border-radius: var(--_input--border-radius);
71
- padding-inline: var(--_input--padding-hor);
72
- color: var(--_input--text-color);
73
- cursor: var(--_input--cursor);
74
- }
75
- .input-stub__icon {
76
- display: flex;
77
- align-items: center;
78
- flex-shrink: 0;
79
- margin-right: 0.625rem;
80
- --sc-kit--icon--size: var(--_input--icon-size);
81
- --sc-kit--icon--color: var(--_input--icon-color);
82
- }
83
- .input-stub__text {
84
- flex: 1;
85
- overflow: hidden;
86
- text-overflow: ellipsis;
87
- white-space: nowrap;
88
- font-size: var(--_input--text-font-size);
89
- }
90
- .input-stub__text--placeholder {
91
- color: light-dark(#9ca3af, #6b7280);
92
- }
93
- .input-stub__action {
94
- display: flex;
95
- align-items: center;
96
- flex-shrink: 0;
97
- margin-left: auto;
98
- }</style>
@@ -1,40 +0,0 @@
1
- import { type Snippet } from 'svelte';
2
- type Props = {
3
- value: string;
4
- placeholder?: string;
5
- inert?: boolean;
6
- on?: Record<string, never>;
7
- icon?: Snippet;
8
- clearButton?: Snippet;
9
- };
10
- /**
11
- * Minimal input-field emulation for use inside ColorPicker.
12
- * Reads `--sc-kit--input--*` CSS variables set by the parent. Will be replaced by a real Input component when available.
13
- *
14
- * ### Props
15
- * | Prop | Type | Default | Description |
16
- * |---|---|---|---|
17
- * | `value` | `string` | — | Displayed text |
18
- * | `placeholder` | `string` | `''` | Placeholder when value is empty |
19
- * | `inert` | `boolean` | — | Reserved for future Input compatibility |
20
- * | `on` | `Record<string, never>` | — | Reserved for future Input compatibility |
21
- * | `icon` | `Snippet` | — | Left icon slot |
22
- * | `clearButton` | `Snippet` | — | Right action slot |
23
- *
24
- * ### CSS Custom Properties
25
- * | Property | Description | Default |
26
- * |---|---|---|
27
- * | `--sc-kit--input--height` | Container height | `2rem` |
28
- * | `--sc-kit--input--background` | Background color | light-dark white/dark |
29
- * | `--sc-kit--input--border-color` | Border color | light-dark neutral |
30
- * | `--sc-kit--input--border-radius` | Border radius | `0.25rem` |
31
- * | `--sc-kit--input--text--font-size` | Text font size | `0.875rem` |
32
- * | `--sc-kit--input--text--color` | Text color | light-dark gray/white |
33
- * | `--sc-kit--input--icon--size` | Icon size | `1rem` |
34
- * | `--sc-kit--input--icon--color` | Icon color | inherited |
35
- * | `--sc-kit--input--padding--hor` | Horizontal padding | `0.625rem` |
36
- * | `--sc-kit--input--cursor--inert` | Cursor when inert | `default` |
37
- */
38
- declare const Cmp: import("svelte").Component<Props, {}, "">;
39
- type Cmp = ReturnType<typeof Cmp>;
40
- export default Cmp;