@julianelda/domos 1.1.1 → 1.2.0

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 (39) hide show
  1. package/dist/assets/{styles.css → background.css} +0 -11
  2. package/dist/button/button.mocks.d.ts +3 -0
  3. package/dist/button/button.mocks.js +18 -0
  4. package/dist/button/button.stories.svelte +9 -17
  5. package/dist/button/button.svelte +2 -8
  6. package/dist/button/button.svelte.d.ts +2 -8
  7. package/dist/button/button.types.d.ts +7 -0
  8. package/dist/button/button.types.js +1 -0
  9. package/dist/card/card.stories.svelte +2 -1
  10. package/dist/checkbox/checkbox.mocks.d.ts +2 -0
  11. package/dist/checkbox/checkbox.mocks.js +8 -0
  12. package/dist/checkbox/checkbox.stories.svelte +11 -13
  13. package/dist/checkbox/checkbox.svelte +1 -0
  14. package/dist/index.d.ts +7 -0
  15. package/dist/index.js +7 -0
  16. package/dist/input/input.mocks.d.ts +5 -0
  17. package/dist/input/input.mocks.js +18 -0
  18. package/dist/input/input.stories.svelte +42 -0
  19. package/dist/input/input.stories.svelte.d.ts +27 -0
  20. package/dist/input/input.svelte +12 -11
  21. package/dist/input-button/input-button.svelte +1 -0
  22. package/dist/input-field/input-field.mocks.d.ts +6 -0
  23. package/dist/input-field/input-field.mocks.js +25 -0
  24. package/dist/input-field/input-field.svelte +18 -1
  25. package/dist/input-field/input-field.types.d.ts +3 -1
  26. package/dist/input-label/input-label.types.d.ts +1 -1
  27. package/dist/input-select/input-select.mocks.d.ts +3 -0
  28. package/dist/input-select/input-select.mocks.js +21 -0
  29. package/dist/input-select/input-select.svelte +1 -0
  30. package/dist/input-select/input-select.types.d.ts +4 -5
  31. package/dist/select/select.mocks.d.ts +3 -0
  32. package/dist/select/select.mocks.js +11 -0
  33. package/dist/select/select.svelte +1 -0
  34. package/dist/select-field/select-field.mocks.d.ts +5 -0
  35. package/dist/select-field/select-field.mocks.js +50 -0
  36. package/dist/select-field/select-field.svelte +1 -1
  37. package/dist/select-field/select-field.types.d.ts +5 -4
  38. package/dist/tailwind.css +0 -2
  39. package/package.json +50 -46
@@ -23,14 +23,3 @@ body {
23
23
  transparent 1px
24
24
  );
25
25
  }
26
-
27
- input[type="number"]::-webkit-inner-spin-button,
28
- input[type="number"]::-webkit-outer-spin-button {
29
- -webkit-appearance: none;
30
- margin: 0;
31
- }
32
-
33
- input[type="number"] {
34
- -moz-appearance: textfield;
35
- appearance: textfield;
36
- }
@@ -0,0 +1,3 @@
1
+ import type { ButtonProps } from "./button.types.ts";
2
+ export declare const buttonPropsPrimary: ButtonProps;
3
+ export declare const buttonPropsSecondary: ButtonProps;
@@ -0,0 +1,18 @@
1
+ export const buttonPropsPrimary = {
2
+ id: "primary-button",
3
+ onClick: () => {
4
+ console.log("");
5
+ },
6
+ style: "primary",
7
+ text: "Primary button",
8
+ type: "button",
9
+ };
10
+ export const buttonPropsSecondary = {
11
+ id: "secondary-button",
12
+ onClick: () => {
13
+ console.log("");
14
+ },
15
+ style: "secondary",
16
+ text: "Secondary button",
17
+ type: "button",
18
+ };
@@ -1,11 +1,14 @@
1
1
  <script module>
2
2
  import { defineMeta } from "@storybook/addon-svelte-csf";
3
3
  import { fn } from "storybook/test";
4
+
5
+ import { buttonPropsPrimary, buttonPropsSecondary } from "./button.mocks.js";
4
6
  import Button from "./button.svelte";
5
7
 
6
8
  const { Story } = defineMeta({
7
- title: "Button",
8
- component: Button,
9
+ args: {
10
+ onclick: fn(),
11
+ },
9
12
  argTypes: {
10
13
  id: { control: "text" },
11
14
  style: {
@@ -18,26 +21,15 @@
18
21
  options: ["button", "submit"],
19
22
  },
20
23
  },
21
- args: {
22
- onclick: fn(),
23
- },
24
+ component: Button,
25
+ title: "Button",
24
26
  });
25
27
  </script>
26
28
 
27
29
  <Story
28
30
  name="Primary"
29
- args={{
30
- id: "button",
31
- style: "primary",
32
- text: "Button primary",
33
- type: "button",
34
- }} />
31
+ args={buttonPropsPrimary} />
35
32
 
36
33
  <Story
37
34
  name="Secondary"
38
- args={{
39
- id: "button",
40
- style: "secondary",
41
- text: "Button secondary",
42
- type: "button",
43
- }} />
35
+ args={buttonPropsSecondary} />
@@ -1,11 +1,5 @@
1
1
  <script lang="ts">
2
- interface Props {
3
- id: string;
4
- onClick: () => void;
5
- style: "primary" | "secondary";
6
- text: string;
7
- type: "button" | "submit";
8
- }
2
+ import type { ButtonProps } from "./button.types.js";
9
3
 
10
4
  const {
11
5
  id,
@@ -13,7 +7,7 @@
13
7
  style = "primary",
14
8
  text,
15
9
  type = "button",
16
- }: Props = $props();
10
+ }: ButtonProps = $props();
17
11
  </script>
18
12
 
19
13
  <button
@@ -1,10 +1,4 @@
1
- interface Props {
2
- id: string;
3
- onClick: () => void;
4
- style: "primary" | "secondary";
5
- text: string;
6
- type: "button" | "submit";
7
- }
8
- declare const Button: import("svelte").Component<Props, {}, "">;
1
+ import type { ButtonProps } from "./button.types.ts";
2
+ declare const Button: import("svelte").Component<ButtonProps, {}, "">;
9
3
  type Button = ReturnType<typeof Button>;
10
4
  export default Button;
@@ -0,0 +1,7 @@
1
+ export interface ButtonProps {
2
+ id: string;
3
+ onClick: () => void;
4
+ style: "primary" | "secondary";
5
+ text: string;
6
+ type: "button" | "submit";
7
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,10 +1,11 @@
1
1
  <script module>
2
2
  import { defineMeta } from "@storybook/addon-svelte-csf";
3
+
3
4
  import Card from "./card.svelte";
4
5
 
5
6
  const { Story } = defineMeta({
6
- title: "Card",
7
7
  component: Card,
8
+ title: "Card",
8
9
  });
9
10
  </script>
10
11
 
@@ -0,0 +1,2 @@
1
+ import type { CheckboxProps } from "./checkbox.types.ts";
2
+ export declare const checkboxProps: CheckboxProps;
@@ -0,0 +1,8 @@
1
+ export const checkboxProps = {
2
+ id: "checkbox-id",
3
+ label: "Checkbox label",
4
+ onChange: () => {
5
+ console.log("");
6
+ },
7
+ value: true,
8
+ };
@@ -1,44 +1,42 @@
1
1
  <script module>
2
2
  import { defineMeta } from "@storybook/addon-svelte-csf";
3
3
  import { fn } from "storybook/test";
4
+
5
+ import { checkboxProps } from "./checkbox.mocks.js";
4
6
  import Checkbox from "./checkbox.svelte";
5
7
 
6
8
  const { Story } = defineMeta({
7
- title: "Checkbox",
8
- component: Checkbox,
9
+ args: {
10
+ onChange: fn(),
11
+ },
9
12
  argTypes: {
13
+ hideLabel: { control: "boolean" },
10
14
  id: { control: "text" },
11
15
  label: { control: "text" },
12
16
  value: { control: "boolean" },
13
- hideLabel: { control: "boolean" },
14
- },
15
- args: {
16
- onChange: fn(),
17
17
  },
18
+ component: Checkbox,
19
+ title: "Checkbox",
18
20
  });
19
21
  </script>
20
22
 
21
23
  <Story
22
24
  name="Checked"
23
25
  args={{
24
- id: "checkbox-checked",
25
- label: "Checked Checkbox",
26
+ ...checkboxProps,
26
27
  value: true,
27
28
  }} />
28
29
 
29
30
  <Story
30
31
  name="Unchecked"
31
32
  args={{
32
- id: "checkbox-unchecked",
33
- label: "Unchecked Checkbox",
33
+ ...checkboxProps,
34
34
  value: false,
35
35
  }} />
36
36
 
37
37
  <Story
38
38
  name="Hidden Label"
39
39
  args={{
40
- id: "checkbox-hidden-label",
41
- label: "Hidden Label Checkbox",
42
- value: false,
40
+ ...checkboxProps,
43
41
  hideLabel: true,
44
42
  }} />
@@ -1,5 +1,6 @@
1
1
  <script lang="ts">
2
2
  import InputLabel from "../input-label/input-label.svelte";
3
+
3
4
  import type { CheckboxProps } from "./checkbox.types.js";
4
5
 
5
6
  const { hideLabel, id, label, onChange, value }: CheckboxProps = $props();
package/dist/index.d.ts CHANGED
@@ -1,4 +1,11 @@
1
+ import "./assets/style/styles.css";
1
2
  export { default as Button } from "./button/button.svelte";
2
3
  export { default as Card } from "./card/card.svelte";
4
+ export { default as Checkbox } from "./checkbox/checkbox.svelte";
5
+ export { default as InputButton } from "./input-button/input-button.svelte";
6
+ export { default as InputField } from "./input-field/input-field.svelte";
7
+ export { default as InputLabel } from "./input-label/input-label.svelte";
8
+ export { default as InputSelect } from "./input-select/input-select.svelte";
3
9
  export { default as Input } from "./input/input.svelte";
10
+ export { default as SelectField } from "./select-field/select-field.svelte";
4
11
  export { default as Select } from "./select/select.svelte";
package/dist/index.js CHANGED
@@ -1,4 +1,11 @@
1
+ import "./assets/style/styles.css";
1
2
  export { default as Button } from "./button/button.svelte";
2
3
  export { default as Card } from "./card/card.svelte";
4
+ export { default as Checkbox } from "./checkbox/checkbox.svelte";
5
+ export { default as InputButton } from "./input-button/input-button.svelte";
6
+ export { default as InputField } from "./input-field/input-field.svelte";
7
+ export { default as InputLabel } from "./input-label/input-label.svelte";
8
+ export { default as InputSelect } from "./input-select/input-select.svelte";
3
9
  export { default as Input } from "./input/input.svelte";
10
+ export { default as SelectField } from "./select-field/select-field.svelte";
4
11
  export { default as Select } from "./select/select.svelte";
@@ -0,0 +1,5 @@
1
+ import type { InputProps } from "./input.types.ts";
2
+ export declare const inputProps1: InputProps;
3
+ export declare const inputProps2: InputProps;
4
+ export declare const inputProps3: InputProps;
5
+ export declare const inputProps4: InputProps;
@@ -0,0 +1,18 @@
1
+ import { inputFieldProps1, inputFieldProps2, inputFieldProps3, inputFieldProps4, } from "./../input-field/input-field.mocks.js";
2
+ export const inputProps1 = {
3
+ ...inputFieldProps1,
4
+ label: "Input text",
5
+ placeholder: "Placeholder",
6
+ };
7
+ export const inputProps2 = {
8
+ ...inputFieldProps2,
9
+ label: "Input number",
10
+ };
11
+ export const inputProps3 = {
12
+ ...inputFieldProps3,
13
+ label: "Input search",
14
+ };
15
+ export const inputProps4 = {
16
+ ...inputFieldProps4,
17
+ label: "Input number with limit",
18
+ };
@@ -0,0 +1,42 @@
1
+ <script module>
2
+ import { defineMeta } from "@storybook/addon-svelte-csf";
3
+ import { fn } from "storybook/test";
4
+
5
+ import Input from "./input.svelte";
6
+
7
+ const { Story } = defineMeta({
8
+ args: {
9
+ onChange: fn(),
10
+ },
11
+ argTypes: {
12
+ hideLabel: { control: "boolean" },
13
+ id: { control: "text" },
14
+ label: { control: "text" },
15
+ value: { control: "boolean" },
16
+ },
17
+ component: Input,
18
+ title: "Input",
19
+ });
20
+ </script>
21
+
22
+ <Story
23
+ name="Default"
24
+ args={{
25
+ id: "input-id-1",
26
+ type: "text",
27
+ label: "Input Label",
28
+ value: "Input Value",
29
+ placeholder: "Placeholder Text",
30
+ }} />
31
+
32
+ <Story
33
+ name="Borderless"
34
+ args={{
35
+ id: "input-id-1",
36
+ type: "text",
37
+ label: "Input Label",
38
+ value: "Input Value",
39
+ placeholder: "Placeholder Text",
40
+ borderless: true,
41
+ hideLabel: true,
42
+ }} />
@@ -0,0 +1,27 @@
1
+ export default Input;
2
+ type Input = SvelteComponent<{
3
+ [x: string]: never;
4
+ }, {
5
+ [evt: string]: CustomEvent<any>;
6
+ }, {}> & {
7
+ $$bindings?: string | undefined;
8
+ };
9
+ declare const Input: $$__sveltets_2_IsomorphicComponent<{
10
+ [x: string]: never;
11
+ }, {
12
+ [evt: string]: CustomEvent<any>;
13
+ }, {}, {}, string>;
14
+ import Input from "./input.svelte";
15
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
16
+ new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
17
+ $$bindings?: Bindings;
18
+ } & Exports;
19
+ (internal: unknown, props: {
20
+ $$events?: Events;
21
+ $$slots?: Slots;
22
+ }): Exports & {
23
+ $set?: any;
24
+ $on?: any;
25
+ };
26
+ z_$$bindings?: Bindings;
27
+ }
@@ -1,9 +1,11 @@
1
1
  <script lang="ts">
2
2
  import InputField from "../input-field/input-field.svelte";
3
3
  import InputLabel from "../input-label/input-label.svelte";
4
+
4
5
  import type { InputProps } from "./input.types.js";
5
6
 
6
7
  const {
8
+ borderless,
7
9
  disabled,
8
10
  hideLabel,
9
11
  id,
@@ -16,19 +18,18 @@
16
18
  }: InputProps = $props();
17
19
  </script>
18
20
 
19
- <div class="flex-1">
21
+ <div class="flex flex-1 flex-col gap-1">
20
22
  <InputLabel
21
23
  {hideLabel}
22
24
  {id}
23
25
  {label} />
24
- <div class="mt-1">
25
- <InputField
26
- {disabled}
27
- {id}
28
- {onChange}
29
- {onKeyDown}
30
- {placeholder}
31
- {type}
32
- {value} />
33
- </div>
26
+ <InputField
27
+ {borderless}
28
+ {disabled}
29
+ {id}
30
+ {onChange}
31
+ {onKeyDown}
32
+ {placeholder}
33
+ {type}
34
+ {value} />
34
35
  </div>
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import InputField from "../input-field/input-field.svelte";
3
3
  import InputLabel from "../input-label/input-label.svelte";
4
+
4
5
  import type { InputButtonProps } from "./input-button.types.js";
5
6
 
6
7
  const {
@@ -0,0 +1,6 @@
1
+ import type { InputFieldProps } from "./input-field.types.ts";
2
+ export declare const inputFieldProps1: InputFieldProps;
3
+ export declare const inputFieldProps2: InputFieldProps;
4
+ export declare const inputFieldProps3: InputFieldProps;
5
+ export declare const inputFieldProps4: InputFieldProps;
6
+ export declare const inputFieldProps5: InputFieldProps;
@@ -0,0 +1,25 @@
1
+ export const inputFieldProps1 = {
2
+ id: "input-id-1",
3
+ type: "text",
4
+ value: "Input value",
5
+ };
6
+ export const inputFieldProps2 = {
7
+ id: "input-id-2",
8
+ type: "number",
9
+ value: 100,
10
+ };
11
+ export const inputFieldProps3 = {
12
+ id: "input-id-3",
13
+ type: "search",
14
+ value: "Search query",
15
+ };
16
+ export const inputFieldProps4 = {
17
+ id: "input-id-4",
18
+ type: "number",
19
+ value: 100,
20
+ };
21
+ export const inputFieldProps5 = {
22
+ id: "input-id-5",
23
+ type: "range",
24
+ value: 10,
25
+ };
@@ -2,6 +2,7 @@
2
2
  import type { InputFieldProps } from "./input-field.types.js";
3
3
 
4
4
  const {
5
+ borderless = false,
5
6
  disabled = false,
6
7
  id,
7
8
  onChange,
@@ -23,6 +24,22 @@
23
24
  {type}
24
25
  {value}
25
26
  class={[
26
- "form-input block w-full appearance-none border border-ink-gray bg-white p-2 px-3 text-ink-black ring-inset focus:border-primary-300 focus:ring-1 focus:ring-primary-300 focus:ring-inset dark:bg-slate dark:text-app-text-dark",
27
+ "form-input block w-full appearance-none border text-ink-black dark:text-app-text-dark",
28
+ borderless === true
29
+ ? "border-0 bg-transparent p-0 ring-0 outline-none focus:ring-0 focus:outline-none"
30
+ : "border-ink-gray bg-white p-2 px-3 ring-inset focus:border-primary-300 focus:ring-1 focus:ring-primary-300 focus:ring-inset dark:bg-slate",
27
31
  withIconLeft === true ? "rounded-l-md" : "rounded-md",
28
32
  ]} />
33
+
34
+ <style>
35
+ input[type="number"]::-webkit-inner-spin-button,
36
+ input[type="number"]::-webkit-outer-spin-button {
37
+ -webkit-appearance: none;
38
+ margin: 0;
39
+ }
40
+
41
+ input[type="number"] {
42
+ -moz-appearance: textfield;
43
+ appearance: textfield;
44
+ }
45
+ </style>
@@ -1,10 +1,12 @@
1
1
  export interface InputFieldProps {
2
+ borderless?: boolean;
2
3
  disabled?: boolean;
3
4
  id: string;
4
5
  onChange?: (value: number | string) => void;
5
6
  onKeyDown?: (value: number | string) => void;
6
7
  placeholder?: string;
7
- type: "number" | "search" | "text";
8
+ type: InputFieldTypes;
8
9
  value: number | string;
9
10
  withIconLeft?: boolean;
10
11
  }
12
+ export type InputFieldTypes = "number" | "range" | "search" | "text";
@@ -2,5 +2,5 @@ export interface InputLabelProps {
2
2
  hideLabel?: boolean;
3
3
  id: string;
4
4
  label: string;
5
- value?: string;
5
+ value?: number | string;
6
6
  }
@@ -0,0 +1,3 @@
1
+ import type { InputSelectProps } from "./input-select.types.ts";
2
+ export declare const inputSelectProps1: InputSelectProps;
3
+ export declare const inputSelectProps2: InputSelectProps;
@@ -0,0 +1,21 @@
1
+ import { selectFieldOptions1, selectFieldOptions2, } from "./../select-field/select-field.mocks.js";
2
+ export const inputSelectProps1 = {
3
+ inputId: "input-id-1",
4
+ inputLabel: "Currency amount",
5
+ inputValue: "100",
6
+ options: [...selectFieldOptions1],
7
+ selectId: "select-id-1",
8
+ selectLabel: "Currency select",
9
+ selectValue: selectFieldOptions1[0].value,
10
+ type: "text",
11
+ };
12
+ export const inputSelectProps2 = {
13
+ inputId: "input-id-2",
14
+ inputLabel: "Currency amount",
15
+ inputValue: "100",
16
+ options: [...selectFieldOptions2],
17
+ selectId: "select-id-2",
18
+ selectLabel: "Currency select",
19
+ selectValue: selectFieldOptions2[2].value,
20
+ type: "text",
21
+ };
@@ -2,6 +2,7 @@
2
2
  import InputField from "../input-field/input-field.svelte";
3
3
  import InputLabel from "../input-label/input-label.svelte";
4
4
  import SelectField from "../select-field/select-field.svelte";
5
+
5
6
  import type { InputSelectProps } from "./input-select.types.js";
6
7
 
7
8
  const {
@@ -1,3 +1,5 @@
1
+ import type { InputFieldTypes } from "./../input-field/input-field.types.ts";
2
+ import type { SelectFieldOption } from "./../select-field/select-field.types.ts";
1
3
  export interface InputSelectProps {
2
4
  hideLabel?: boolean;
3
5
  inputDisabled?: boolean;
@@ -8,12 +10,9 @@ export interface InputSelectProps {
8
10
  onInputChange?: (value: number | string) => void;
9
11
  onInputKeydown?: (key: number | string) => void;
10
12
  onSelectChange?: (value: string) => void;
11
- options: {
12
- label: string;
13
- value: string;
14
- }[];
13
+ options: SelectFieldOption[];
15
14
  selectId: string;
16
15
  selectLabel: string;
17
16
  selectValue: string;
18
- type: "number" | "search" | "text";
17
+ type: InputFieldTypes;
19
18
  }
@@ -0,0 +1,3 @@
1
+ import type { SelectProps } from "./select.types.ts";
2
+ export declare const selectProps1: SelectProps;
3
+ export declare const selectProps2: SelectProps;
@@ -0,0 +1,11 @@
1
+ import { selectFieldProps1, selectFieldProps2, } from "./../select-field/select-field.mocks.js";
2
+ export const selectProps1 = {
3
+ ...selectFieldProps1,
4
+ label: "Select currency",
5
+ value: selectFieldProps1.options[0].value,
6
+ };
7
+ export const selectProps2 = {
8
+ ...selectFieldProps2,
9
+ label: "Select currency",
10
+ value: selectFieldProps2.options[2].value,
11
+ };
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import InputLabel from "../input-label/input-label.svelte";
3
3
  import SelectField from "../select-field/select-field.svelte";
4
+
4
5
  import type { SelectProps } from "./select.types.js";
5
6
 
6
7
  const { hideLabel, id, label, onChange, options, value }: SelectProps =
@@ -0,0 +1,5 @@
1
+ import type { SelectFieldOption, SelectFieldProps } from "./select-field.types.ts";
2
+ export declare const selectFieldOptions1: SelectFieldOption[];
3
+ export declare const selectFieldOptions2: SelectFieldOption[];
4
+ export declare const selectFieldProps1: SelectFieldProps;
5
+ export declare const selectFieldProps2: SelectFieldProps;
@@ -0,0 +1,50 @@
1
+ export const selectFieldOptions1 = [
2
+ {
3
+ label: "Euro",
4
+ value: "EUR",
5
+ },
6
+ {
7
+ label: "British Pound",
8
+ value: "GBP",
9
+ },
10
+ {
11
+ label: "Japanese Yen",
12
+ value: "JPY",
13
+ },
14
+ {
15
+ label: "United States Dollar",
16
+ value: "USD",
17
+ },
18
+ ];
19
+ export const selectFieldOptions2 = [
20
+ {
21
+ label: "EUR",
22
+ value: "EUR",
23
+ },
24
+ {
25
+ label: "GBP",
26
+ value: "GBP",
27
+ },
28
+ {
29
+ label: "JPY",
30
+ value: "JPY",
31
+ },
32
+ {
33
+ label: "USD",
34
+ value: "USD",
35
+ },
36
+ ];
37
+ export const selectFieldProps1 = {
38
+ id: "select-id-1",
39
+ inInputField: false,
40
+ onChange: () => { },
41
+ options: [...selectFieldOptions1],
42
+ value: selectFieldOptions1[0].value,
43
+ };
44
+ export const selectFieldProps2 = {
45
+ id: "select-id-2",
46
+ inInputField: false,
47
+ onChange: () => { },
48
+ options: [...selectFieldOptions2],
49
+ value: selectFieldOptions2[2].value,
50
+ };
@@ -12,7 +12,7 @@
12
12
 
13
13
  <select
14
14
  class={[
15
- "w-full form-select appearance-none rounded-md border border-ink-gray py-2 pr-8 pl-2 text-ink-black focus:ring-1 focus:ring-primary-300 focus:ring-inset dark:bg-slate dark:text-ink-white",
15
+ "form-select w-full appearance-none rounded-md border border-ink-gray py-2 pr-8 pl-2 text-ink-black focus:ring-1 focus:ring-primary-300 focus:ring-inset dark:bg-slate dark:text-ink-white",
16
16
  inInputField && "h-full rounded-l-none bg-transparent",
17
17
  !inInputField && "block pl-3",
18
18
  ]}
@@ -1,10 +1,11 @@
1
+ export interface SelectFieldOption {
2
+ label: string;
3
+ value: string;
4
+ }
1
5
  export interface SelectFieldProps {
2
6
  id: string;
3
7
  inInputField?: boolean;
4
8
  onChange: (value: string) => void;
5
- options: {
6
- label: string;
7
- value: string;
8
- }[];
9
+ options: SelectFieldOption[];
9
10
  value: string;
10
11
  }
package/dist/tailwind.css CHANGED
@@ -1,6 +1,4 @@
1
1
  @import "tailwindcss";
2
2
  @import "@julianelda/chroma";
3
3
 
4
- @custom-variant dark (&:is(.dark *));
5
-
6
4
  @source "./**/*.{svelte,js,ts}";
package/package.json CHANGED
@@ -1,48 +1,53 @@
1
1
  {
2
2
  "name": "@julianelda/domos",
3
- "version": "1.1.1",
4
- "scripts": {
5
- "dev": "vite dev",
6
- "build": "vite build && bun run prepack",
7
- "preview": "vite preview",
8
- "prepare": "svelte-kit sync || echo ''",
9
- "prepack": "svelte-kit sync && svelte-package && publint",
10
- "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
11
- "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
12
- "lint": "prettier --check . && eslint .",
13
- "format": "prettier --write .",
14
- "test": "vitest --project=client",
15
- "test:e2e": "playwright test",
16
- "storybook": "storybook dev -p 6006",
17
- "build-storybook": "storybook build"
18
- },
3
+ "version": "1.2.0",
4
+ "keywords": [
5
+ "svelte"
6
+ ],
19
7
  "files": [
20
8
  "dist",
21
9
  "!dist/**/*.test.*",
22
10
  "!dist/**/*.spec.*"
23
11
  ],
24
- "main": "./dist/index.js",
25
- "module": "./dist/index.js",
12
+ "type": "module",
26
13
  "sideEffects": [
27
14
  "**/*.css"
28
15
  ],
29
- "svelte": "./dist/index.js",
16
+ "main": "./dist/index.js",
17
+ "module": "./dist/index.js",
30
18
  "types": "./dist/index.d.ts",
31
- "type": "module",
19
+ "svelte": "./dist/index.js",
32
20
  "exports": {
33
21
  ".": {
34
22
  "types": "./dist/index.d.ts",
35
23
  "svelte": "./dist/index.js"
36
24
  },
37
- "./tailwind": "./dist/tailwind.css"
25
+ "./tailwind": "./dist/tailwind.css",
26
+ "./background": "./dist/assets/background.css"
38
27
  },
39
- "peerDependencies": {
40
- "svelte": "^5.0.0"
28
+ "scripts": {
29
+ "build": "vite build && bun run prepack",
30
+ "build-storybook": "storybook build",
31
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
32
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
33
+ "dev": "vite dev",
34
+ "format": "oxfmt",
35
+ "lint": "oxlint && prettier --check **/*.svelte && eslint .",
36
+ "prepack": "svelte-kit sync && svelte-package && publint",
37
+ "prepare": "svelte-kit sync || echo ''",
38
+ "prettier": "prettier --check **/*.svelte",
39
+ "preview": "vite preview",
40
+ "storybook": "storybook dev -p 6006 --no-open",
41
+ "test": "vitest"
42
+ },
43
+ "dependencies": {
44
+ "@julianelda/chroma": "^1.0.0",
45
+ "@julianelda/stilo": "^1.0.2"
41
46
  },
42
47
  "devDependencies": {
43
- "@eslint/compat": "^2.0.2",
44
- "@eslint/js": "^9.39.2",
45
- "@lucide/svelte": "^0.563.1",
48
+ "@eslint/js": "^10.0.1",
49
+ "@julianelda/lexis": "^2.6.0",
50
+ "@lucide/svelte": "^1.16.0",
46
51
  "@playwright/test": "^1.58.1",
47
52
  "@prettier/plugin-oxc": "^0.1.3",
48
53
  "@storybook/addon-a11y": "^10.2.7",
@@ -51,37 +56,36 @@
51
56
  "@storybook/sveltekit": "^10.2.7",
52
57
  "@sveltejs/kit": "^2.50.2",
53
58
  "@sveltejs/package": "^2.5.7",
54
- "@sveltejs/vite-plugin-svelte": "^6.2.4",
59
+ "@sveltejs/vite-plugin-svelte": "^7.1.2",
55
60
  "@tailwindcss/forms": "^0.5.11",
56
61
  "@tailwindcss/typography": "^0.5.19",
57
62
  "@tailwindcss/vite": "^4.1.18",
58
63
  "@types/node": "^24",
59
- "@vitest/browser-playwright": "^4.0.18",
60
- "eslint": "^9.39.2",
61
- "eslint-config-prettier": "^10.1.8",
62
- "eslint-plugin-storybook": "^10.2.7",
64
+ "@typescript/native-preview": "^7.0.0-dev.20260521.1",
65
+ "@vitest/browser-playwright": "^4.1.7",
66
+ "eslint": "^10.4.0",
67
+ "eslint-plugin-oxlint": "^1.66.0",
68
+ "eslint-plugin-perfectionist": "^5.9.0",
63
69
  "eslint-plugin-svelte": "^3.14.0",
64
70
  "globals": "^17.3.0",
71
+ "oxfmt": "^0.51.0",
72
+ "oxlint": "^1.66.0",
73
+ "oxlint-tsgolint": "^0.23.0",
65
74
  "playwright": "^1.58.1",
66
- "prettier": "^3.8.1",
67
- "prettier-plugin-svelte": "^3.4.1",
68
- "prettier-plugin-tailwindcss": "^0.7.2",
75
+ "prettier": "^3.8.3",
76
+ "prettier-plugin-svelte": "3",
77
+ "prettier-plugin-tailwindcss": "^0.8.0",
69
78
  "publint": "^0.3.17",
70
79
  "storybook": "^10.2.7",
71
- "svelte": "^5.49.2",
80
+ "svelte": "^5.55.9",
72
81
  "svelte-check": "^4.3.6",
73
- "tailwindcss": "^4.1.18",
74
- "typescript": "^5.9.3",
82
+ "tailwindcss": "^4.3.0",
75
83
  "typescript-eslint": "^8.54.0",
76
- "vite": "^7.3.1",
77
- "vitest": "^4.0.18",
78
- "vitest-browser-svelte": "^2.0.2"
84
+ "vite": "^8.0.14",
85
+ "vitest": "^4.1.7",
86
+ "vitest-browser-svelte": "^2.1.1"
79
87
  },
80
- "keywords": [
81
- "svelte"
82
- ],
83
- "dependencies": {
84
- "@julianelda/chroma": "^1.0.0",
85
- "@julianelda/stilo": "^1.0.2"
88
+ "peerDependencies": {
89
+ "svelte": "^5.0.0"
86
90
  }
87
91
  }