From 9d0a8df94a2b69dcf22f41a79896b0774651ae7b Mon Sep 17 00:00:00 2001 From: Jeanne Mas Date: Mon, 22 Apr 2024 11:11:46 -0400 Subject: [PATCH] Refactor component exports and remove unused event types --- .changeset/proud-moose-itch.md | 5 ++++ src/lib/components/button/Button.svelte | 6 +---- src/lib/components/button/index.ts | 1 - src/lib/components/calendar/Cell.svelte | 6 +---- src/lib/components/calendar/Day.svelte | 6 +---- src/lib/components/calendar/Grid.svelte | 6 +---- src/lib/components/calendar/GridBody.svelte | 6 +---- src/lib/components/calendar/GridHead.svelte | 6 +---- src/lib/components/calendar/GridRow.svelte | 6 +---- src/lib/components/calendar/HeadCell.svelte | 6 +---- src/lib/components/calendar/Header.svelte | 6 +---- src/lib/components/calendar/Heading.svelte | 6 +---- src/lib/components/calendar/Months.svelte | 6 +---- src/lib/components/calendar/NextButton.svelte | 6 +---- .../components/calendar/PreviousButton.svelte | 6 +---- src/lib/components/calendar/Root.svelte | 25 ++++++++----------- src/lib/components/calendar/index.ts | 13 ---------- src/lib/components/collapsible/Content.svelte | 6 +---- src/lib/components/collapsible/Root.svelte | 12 ++++----- src/lib/components/collapsible/Trigger.svelte | 6 +---- src/lib/components/collapsible/index.ts | 3 --- src/lib/components/container/Container.svelte | 6 +---- src/lib/components/container/index.ts | 9 +------ src/lib/components/form/Control.svelte | 6 +---- src/lib/components/form/Description.svelte | 6 +---- src/lib/components/form/ElementField.svelte | 6 +---- src/lib/components/form/Field.svelte | 6 +---- src/lib/components/form/FieldErrors.svelte | 6 +---- src/lib/components/form/Fieldset.svelte | 6 +---- src/lib/components/form/Label.svelte | 6 +---- src/lib/components/form/Legend.svelte | 6 +---- src/lib/components/form/Root.svelte | 6 +---- src/lib/components/form/index.ts | 9 ------- src/lib/components/input/Input.svelte | 6 +---- src/lib/components/input/index.ts | 1 - src/lib/components/label/Label.svelte | 6 +---- src/lib/components/label/index.ts | 9 +------ src/lib/components/popover/Close.svelte | 6 +---- src/lib/components/popover/Content.svelte | 6 +---- src/lib/components/popover/Root.svelte | 12 +++------ src/lib/components/popover/Trigger.svelte | 6 +---- src/lib/components/popover/index.ts | 4 --- src/lib/components/select/Content.svelte | 6 +---- src/lib/components/select/Group.svelte | 6 +---- src/lib/components/select/Input.svelte | 6 +---- src/lib/components/select/Item.svelte | 6 +---- src/lib/components/select/Label.svelte | 6 +---- src/lib/components/select/Root.svelte | 17 ++++++------- src/lib/components/select/Separator.svelte | 6 +---- src/lib/components/select/Trigger.svelte | 6 +---- src/lib/components/select/Value.svelte | 6 +---- src/lib/components/select/index.ts | 9 ------- src/lib/components/separator/Separator.svelte | 6 +---- src/lib/components/separator/index.ts | 1 - src/lib/components/switch/Switch.svelte | 10 +++----- src/lib/components/switch/index.ts | 9 +------ src/lib/components/textarea/Textarea.svelte | 6 +---- src/lib/components/textarea/index.ts | 9 +------ src/lib/components/tooltip/Content.svelte | 6 +---- src/lib/components/tooltip/Root.svelte | 10 +++----- src/lib/components/tooltip/Trigger.svelte | 6 +---- src/lib/components/tooltip/index.ts | 3 --- 62 files changed, 84 insertions(+), 339 deletions(-) create mode 100644 .changeset/proud-moose-itch.md diff --git a/.changeset/proud-moose-itch.md b/.changeset/proud-moose-itch.md new file mode 100644 index 0000000..c5c68ac --- /dev/null +++ b/.changeset/proud-moose-itch.md @@ -0,0 +1,5 @@ +--- +'@jeanne-mas/svelte-ui': minor +--- + +Simplified exports by removing Events types diff --git a/src/lib/components/button/Button.svelte b/src/lib/components/button/Button.svelte index 3a5077d..a3bc292 100644 --- a/src/lib/components/button/Button.svelte +++ b/src/lib/components/button/Button.svelte @@ -8,10 +8,6 @@ * The attributes of the button component. */ export type Attributes = ButtonPrimitive.Props; - /** - * The Svelte 5 like events of the button component. - */ - export type Events = Record; /** * The props of the button component. */ @@ -96,7 +92,7 @@ @@ -54,7 +51,8 @@ })}" disabled="{disabled}" el="{el}" - open="{open}" + onOpenChange="{onOpenChange}" + bind:open="{open}" let:builder > diff --git a/src/lib/components/collapsible/Trigger.svelte b/src/lib/components/collapsible/Trigger.svelte index 926def0..9a9ea67 100644 --- a/src/lib/components/collapsible/Trigger.svelte +++ b/src/lib/components/collapsible/Trigger.svelte @@ -9,10 +9,6 @@ * The attributes of the collapsible trigger component. */ export type Attributes = SvelteHTMLElements['button']; - /** - * The Svelte 5 like events of the collapsible trigger component. - */ - export type Events = Record; /** * The props of the collapsible trigger component. */ @@ -32,7 +28,7 @@