@carbon/charts-svelte 1.22.18 → 1.22.19

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 (61) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +34 -55
  3. package/dist/AlluvialChart.svelte +14 -8
  4. package/dist/AlluvialChart.svelte.d.ts +9 -35
  5. package/dist/AreaChart.svelte +14 -8
  6. package/dist/AreaChart.svelte.d.ts +9 -35
  7. package/dist/BarChartGrouped.svelte +14 -8
  8. package/dist/BarChartGrouped.svelte.d.ts +9 -35
  9. package/dist/BarChartSimple.svelte +14 -8
  10. package/dist/BarChartSimple.svelte.d.ts +9 -35
  11. package/dist/BarChartStacked.svelte +14 -8
  12. package/dist/BarChartStacked.svelte.d.ts +9 -35
  13. package/dist/BaseChart.svelte +23 -23
  14. package/dist/BaseChart.svelte.d.ts +33 -31
  15. package/dist/BoxplotChart.svelte +14 -8
  16. package/dist/BoxplotChart.svelte.d.ts +9 -35
  17. package/dist/BubbleChart.svelte +14 -8
  18. package/dist/BubbleChart.svelte.d.ts +9 -35
  19. package/dist/BulletChart.svelte +14 -8
  20. package/dist/BulletChart.svelte.d.ts +9 -35
  21. package/dist/ChoroplethChart.svelte +14 -8
  22. package/dist/ChoroplethChart.svelte.d.ts +9 -35
  23. package/dist/CirclePackChart.svelte +14 -8
  24. package/dist/CirclePackChart.svelte.d.ts +9 -35
  25. package/dist/ComboChart.svelte +14 -8
  26. package/dist/ComboChart.svelte.d.ts +9 -35
  27. package/dist/DonutChart.svelte +14 -8
  28. package/dist/DonutChart.svelte.d.ts +9 -35
  29. package/dist/GaugeChart.svelte +14 -8
  30. package/dist/GaugeChart.svelte.d.ts +9 -35
  31. package/dist/HeatmapChart.svelte +14 -8
  32. package/dist/HeatmapChart.svelte.d.ts +9 -35
  33. package/dist/HistogramChart.svelte +14 -8
  34. package/dist/HistogramChart.svelte.d.ts +9 -35
  35. package/dist/LineChart.svelte +14 -8
  36. package/dist/LineChart.svelte.d.ts +9 -35
  37. package/dist/LollipopChart.svelte +14 -8
  38. package/dist/LollipopChart.svelte.d.ts +9 -35
  39. package/dist/MeterChart.svelte +14 -8
  40. package/dist/MeterChart.svelte.d.ts +9 -35
  41. package/dist/PieChart.svelte +14 -8
  42. package/dist/PieChart.svelte.d.ts +9 -35
  43. package/dist/RadarChart.svelte +14 -8
  44. package/dist/RadarChart.svelte.d.ts +9 -35
  45. package/dist/ScatterChart.svelte +14 -8
  46. package/dist/ScatterChart.svelte.d.ts +9 -35
  47. package/dist/StackedAreaChart.svelte +14 -8
  48. package/dist/StackedAreaChart.svelte.d.ts +9 -32
  49. package/dist/TreeChart.svelte +14 -8
  50. package/dist/TreeChart.svelte.d.ts +9 -35
  51. package/dist/TreemapChart.svelte +14 -8
  52. package/dist/TreemapChart.svelte.d.ts +9 -35
  53. package/dist/WordCloudChart.svelte +14 -8
  54. package/dist/WordCloudChart.svelte.d.ts +9 -36
  55. package/dist/interfaces.d.ts +24 -0
  56. package/dist/interfaces.js +1 -0
  57. package/dist/styles.css +198 -0
  58. package/dist/styles.css.map +1 -1
  59. package/dist/styles.min.css +197 -0
  60. package/dist/styles.min.css.map +1 -1
  61. package/package.json +12 -12
@@ -1,33 +1,35 @@
1
- import { SvelteComponentTyped } from 'svelte'
2
- import type { Charts, ChartConfig, BaseChartOptions, ChartTabularData } from '@carbon/charts'
3
- declare class __sveltets_Render<T extends BaseChartOptions> {
4
- props(): {
5
- [x: string]: any
6
- data?: ChartTabularData | undefined
7
- options?: T | undefined
8
- Chart: new (holder: HTMLDivElement, chartConfigs: ChartConfig<T>) => Charts
9
- chart: Charts | undefined
10
- ref: HTMLDivElement | undefined
11
- id?: string | undefined
12
- }
13
- events(): {
14
- load: CustomEvent<null>
15
- update: CustomEvent<{
16
- data: ChartTabularData
17
- options: T
18
- }>
19
- destroy: CustomEvent<null>
20
- } & {
21
- [evt: string]: CustomEvent<any>
22
- }
1
+ import type { Charts, BaseChartOptions } from '@carbon/charts'
2
+ import type { BaseChartProps } from './interfaces'
3
+ declare class __sveltets_Render<
4
+ ChartType extends Charts,
5
+ ChartOptionType extends BaseChartOptions
6
+ > {
7
+ props(): BaseChartProps<ChartType, ChartOptionType>
8
+ events(): {}
23
9
  slots(): {}
10
+ bindings(): 'ref' | 'chart'
11
+ exports(): {}
24
12
  }
25
- export type BaseChartProps<T extends BaseChartOptions> = ReturnType<__sveltets_Render<T>['props']>
26
- export type BaseChartEvents<T extends BaseChartOptions> = ReturnType<__sveltets_Render<T>['events']>
27
- export type BaseChartSlots<T extends BaseChartOptions> = ReturnType<__sveltets_Render<T>['slots']>
28
- export default class BaseChart<T extends BaseChartOptions> extends SvelteComponentTyped<
29
- BaseChartProps<T>,
30
- BaseChartEvents<T>,
31
- BaseChartSlots<T>
32
- > {}
33
- export {}
13
+ interface $$IsomorphicComponent {
14
+ new <ChartType extends Charts, ChartOptionType extends BaseChartOptions>(
15
+ options: import('svelte').ComponentConstructorOptions<
16
+ ReturnType<__sveltets_Render<ChartType, ChartOptionType>['props']>
17
+ >
18
+ ): import('svelte').SvelteComponent<
19
+ ReturnType<__sveltets_Render<ChartType, ChartOptionType>['props']>,
20
+ ReturnType<__sveltets_Render<ChartType, ChartOptionType>['events']>,
21
+ ReturnType<__sveltets_Render<ChartType, ChartOptionType>['slots']>
22
+ > & {
23
+ $$bindings?: ReturnType<__sveltets_Render<ChartType, ChartOptionType>['bindings']>
24
+ } & ReturnType<__sveltets_Render<ChartType, ChartOptionType>['exports']>
25
+ <ChartType extends Charts, ChartOptionType extends BaseChartOptions>(
26
+ internal: unknown,
27
+ props: ReturnType<__sveltets_Render<ChartType, ChartOptionType>['props']> & {}
28
+ ): ReturnType<__sveltets_Render<ChartType, ChartOptionType>['exports']>
29
+ z_$$bindings?: ReturnType<__sveltets_Render<any, any>['bindings']>
30
+ }
31
+ declare const BaseChart: $$IsomorphicComponent
32
+ type BaseChart<ChartType extends Charts, ChartOptionType extends BaseChartOptions> = InstanceType<
33
+ typeof BaseChart<ChartType, ChartOptionType>
34
+ >
35
+ export default BaseChart
@@ -1,19 +1,25 @@
1
1
  <script>
2
2
  import { BoxplotChart as BoxplotChartCore } from '@carbon/charts'
3
3
  import BaseChart from './BaseChart.svelte'
4
- export let options
5
- export let data
6
- export let chart = undefined
7
- export let ref = undefined
4
+ let {
5
+ data,
6
+ options,
7
+ ref = $bindable(),
8
+ chart = $bindable(),
9
+ onload,
10
+ onupdate,
11
+ ondestroy,
12
+ ...rest
13
+ } = $props()
8
14
  </script>
9
15
 
10
16
  <BaseChart
11
- {...$$restProps}
12
17
  Chart={BoxplotChartCore}
13
18
  {options}
14
19
  {data}
15
20
  bind:ref
16
21
  bind:chart
17
- on:load
18
- on:update
19
- on:destroy />
22
+ {onload}
23
+ {onupdate}
24
+ {ondestroy}
25
+ {...rest} />
@@ -1,35 +1,9 @@
1
- import { SvelteComponentTyped } from 'svelte'
2
- import {
3
- BoxplotChart as BoxplotChartCore,
4
- type BoxplotChartOptions,
5
- type ChartTabularData
6
- } from '@carbon/charts'
7
- declare const __propDef: {
8
- props: {
9
- [x: string]: any
10
- options: BoxplotChartOptions
11
- data: ChartTabularData
12
- chart?: BoxplotChartCore | undefined
13
- ref?: HTMLDivElement | undefined
14
- }
15
- events: {
16
- load: CustomEvent<null>
17
- update: CustomEvent<{
18
- data: ChartTabularData
19
- options: import('@carbon/charts').BaseChartOptions
20
- }>
21
- destroy: CustomEvent<null>
22
- } & {
23
- [evt: string]: CustomEvent<any>
24
- }
25
- slots: {}
26
- }
27
- export type BoxplotChartProps = typeof __propDef.props
28
- export type BoxplotChartEvents = typeof __propDef.events
29
- export type BoxplotChartSlots = typeof __propDef.slots
30
- export default class BoxplotChart extends SvelteComponentTyped<
31
- BoxplotChartProps,
32
- BoxplotChartEvents,
33
- BoxplotChartSlots
34
- > {}
35
- export {}
1
+ import { BoxplotChart as BoxplotChartCore } from '@carbon/charts'
2
+ import type { ChartProps } from './interfaces'
3
+ declare const BoxplotChart: import('svelte').Component<
4
+ ChartProps<BoxplotChartCore, import('@carbon/charts').AxisChartOptions>,
5
+ {},
6
+ 'ref' | 'chart'
7
+ >
8
+ type BoxplotChart = ReturnType<typeof BoxplotChart>
9
+ export default BoxplotChart
@@ -1,19 +1,25 @@
1
1
  <script>
2
2
  import { BubbleChart as BubbleChartCore } from '@carbon/charts'
3
3
  import BaseChart from './BaseChart.svelte'
4
- export let options
5
- export let data
6
- export let chart = undefined
7
- export let ref = undefined
4
+ let {
5
+ data,
6
+ options,
7
+ ref = $bindable(),
8
+ chart = $bindable(),
9
+ onload,
10
+ onupdate,
11
+ ondestroy,
12
+ ...rest
13
+ } = $props()
8
14
  </script>
9
15
 
10
16
  <BaseChart
11
- {...$$restProps}
12
17
  Chart={BubbleChartCore}
13
18
  {options}
14
19
  {data}
15
20
  bind:ref
16
21
  bind:chart
17
- on:load
18
- on:update
19
- on:destroy />
22
+ {onload}
23
+ {onupdate}
24
+ {ondestroy}
25
+ {...rest} />
@@ -1,35 +1,9 @@
1
- import { SvelteComponentTyped } from 'svelte'
2
- import {
3
- BubbleChart as BubbleChartCore,
4
- type BubbleChartOptions,
5
- type ChartTabularData
6
- } from '@carbon/charts'
7
- declare const __propDef: {
8
- props: {
9
- [x: string]: any
10
- options: BubbleChartOptions
11
- data: ChartTabularData
12
- chart?: BubbleChartCore | undefined
13
- ref?: HTMLDivElement | undefined
14
- }
15
- events: {
16
- load: CustomEvent<null>
17
- update: CustomEvent<{
18
- data: ChartTabularData
19
- options: import('@carbon/charts').BaseChartOptions
20
- }>
21
- destroy: CustomEvent<null>
22
- } & {
23
- [evt: string]: CustomEvent<any>
24
- }
25
- slots: {}
26
- }
27
- export type BubbleChartProps = typeof __propDef.props
28
- export type BubbleChartEvents = typeof __propDef.events
29
- export type BubbleChartSlots = typeof __propDef.slots
30
- export default class BubbleChart extends SvelteComponentTyped<
31
- BubbleChartProps,
32
- BubbleChartEvents,
33
- BubbleChartSlots
34
- > {}
35
- export {}
1
+ import { BubbleChart as BubbleChartCore, type BubbleChartOptions } from '@carbon/charts'
2
+ import type { ChartProps } from './interfaces'
3
+ declare const BubbleChart: import('svelte').Component<
4
+ ChartProps<BubbleChartCore, BubbleChartOptions>,
5
+ {},
6
+ 'ref' | 'chart'
7
+ >
8
+ type BubbleChart = ReturnType<typeof BubbleChart>
9
+ export default BubbleChart
@@ -1,19 +1,25 @@
1
1
  <script>
2
2
  import { BulletChart as BulletChartCore } from '@carbon/charts'
3
3
  import BaseChart from './BaseChart.svelte'
4
- export let options
5
- export let data
6
- export let chart = undefined
7
- export let ref = undefined
4
+ let {
5
+ data,
6
+ options,
7
+ ref = $bindable(),
8
+ chart = $bindable(),
9
+ onload,
10
+ onupdate,
11
+ ondestroy,
12
+ ...rest
13
+ } = $props()
8
14
  </script>
9
15
 
10
16
  <BaseChart
11
- {...$$restProps}
12
17
  Chart={BulletChartCore}
13
18
  {options}
14
19
  {data}
15
20
  bind:ref
16
21
  bind:chart
17
- on:load
18
- on:update
19
- on:destroy />
22
+ {onload}
23
+ {onupdate}
24
+ {ondestroy}
25
+ {...rest} />
@@ -1,35 +1,9 @@
1
- import { SvelteComponentTyped } from 'svelte'
2
- import {
3
- BulletChart as BulletChartCore,
4
- type BulletChartOptions,
5
- type ChartTabularData
6
- } from '@carbon/charts'
7
- declare const __propDef: {
8
- props: {
9
- [x: string]: any
10
- options: BulletChartOptions
11
- data: ChartTabularData
12
- chart?: BulletChartCore | undefined
13
- ref?: HTMLDivElement | undefined
14
- }
15
- events: {
16
- load: CustomEvent<null>
17
- update: CustomEvent<{
18
- data: ChartTabularData
19
- options: import('@carbon/charts').BaseChartOptions
20
- }>
21
- destroy: CustomEvent<null>
22
- } & {
23
- [evt: string]: CustomEvent<any>
24
- }
25
- slots: {}
26
- }
27
- export type BulletChartProps = typeof __propDef.props
28
- export type BulletChartEvents = typeof __propDef.events
29
- export type BulletChartSlots = typeof __propDef.slots
30
- export default class BulletChart extends SvelteComponentTyped<
31
- BulletChartProps,
32
- BulletChartEvents,
33
- BulletChartSlots
34
- > {}
35
- export {}
1
+ import { BulletChart as BulletChartCore, type BulletChartOptions } from '@carbon/charts'
2
+ import type { ChartProps } from './interfaces'
3
+ declare const BulletChart: import('svelte').Component<
4
+ ChartProps<BulletChartCore, BulletChartOptions>,
5
+ {},
6
+ 'ref' | 'chart'
7
+ >
8
+ type BulletChart = ReturnType<typeof BulletChart>
9
+ export default BulletChart
@@ -1,19 +1,25 @@
1
1
  <script>
2
2
  import { ChoroplethChart as ChoroplethChartCore } from '@carbon/charts'
3
3
  import BaseChart from './BaseChart.svelte'
4
- export let options
5
- export let data
6
- export let chart = undefined
7
- export let ref = undefined
4
+ let {
5
+ data,
6
+ options,
7
+ ref = $bindable(),
8
+ chart = $bindable(),
9
+ onload,
10
+ onupdate,
11
+ ondestroy,
12
+ ...rest
13
+ } = $props()
8
14
  </script>
9
15
 
10
16
  <BaseChart
11
- {...$$restProps}
12
17
  Chart={ChoroplethChartCore}
13
18
  {options}
14
19
  {data}
15
20
  bind:ref
16
21
  bind:chart
17
- on:load
18
- on:update
19
- on:destroy />
22
+ {onload}
23
+ {onupdate}
24
+ {ondestroy}
25
+ {...rest} />
@@ -1,35 +1,9 @@
1
- import { SvelteComponentTyped } from 'svelte'
2
- import {
3
- ChoroplethChart as ChoroplethChartCore,
4
- type ChoroplethChartOptions,
5
- type ChartTabularData
6
- } from '@carbon/charts'
7
- declare const __propDef: {
8
- props: {
9
- [x: string]: any
10
- options: ChoroplethChartOptions
11
- data: ChartTabularData
12
- chart?: ChoroplethChartCore | undefined
13
- ref?: HTMLDivElement | undefined
14
- }
15
- events: {
16
- load: CustomEvent<null>
17
- update: CustomEvent<{
18
- data: ChartTabularData
19
- options: import('@carbon/charts').BaseChartOptions
20
- }>
21
- destroy: CustomEvent<null>
22
- } & {
23
- [evt: string]: CustomEvent<any>
24
- }
25
- slots: {}
26
- }
27
- export type ChoroplethChartProps = typeof __propDef.props
28
- export type ChoroplethChartEvents = typeof __propDef.events
29
- export type ChoroplethChartSlots = typeof __propDef.slots
30
- export default class ChoroplethChart extends SvelteComponentTyped<
31
- ChoroplethChartProps,
32
- ChoroplethChartEvents,
33
- ChoroplethChartSlots
34
- > {}
35
- export {}
1
+ import { ChoroplethChart as ChoroplethChartCore, type ChoroplethChartOptions } from '@carbon/charts'
2
+ import type { ChartProps } from './interfaces'
3
+ declare const ChoroplethChart: import('svelte').Component<
4
+ ChartProps<ChoroplethChartCore, ChoroplethChartOptions>,
5
+ {},
6
+ 'ref' | 'chart'
7
+ >
8
+ type ChoroplethChart = ReturnType<typeof ChoroplethChart>
9
+ export default ChoroplethChart
@@ -1,19 +1,25 @@
1
1
  <script>
2
2
  import { CirclePackChart as CirclePackChartCore } from '@carbon/charts'
3
3
  import BaseChart from './BaseChart.svelte'
4
- export let options
5
- export let data
6
- export let chart = undefined
7
- export let ref = undefined
4
+ let {
5
+ data,
6
+ options,
7
+ ref = $bindable(),
8
+ chart = $bindable(),
9
+ onload,
10
+ onupdate,
11
+ ondestroy,
12
+ ...rest
13
+ } = $props()
8
14
  </script>
9
15
 
10
16
  <BaseChart
11
- {...$$restProps}
12
17
  Chart={CirclePackChartCore}
13
18
  {options}
14
19
  {data}
15
20
  bind:ref
16
21
  bind:chart
17
- on:load
18
- on:update
19
- on:destroy />
22
+ {onload}
23
+ {onupdate}
24
+ {ondestroy}
25
+ {...rest} />
@@ -1,35 +1,9 @@
1
- import { SvelteComponentTyped } from 'svelte'
2
- import {
3
- CirclePackChart as CirclePackChartCore,
4
- type CirclePackChartOptions,
5
- type ChartTabularData
6
- } from '@carbon/charts'
7
- declare const __propDef: {
8
- props: {
9
- [x: string]: any
10
- options: CirclePackChartOptions
11
- data: ChartTabularData
12
- chart?: CirclePackChartCore | undefined
13
- ref?: HTMLDivElement | undefined
14
- }
15
- events: {
16
- load: CustomEvent<null>
17
- update: CustomEvent<{
18
- data: ChartTabularData
19
- options: import('@carbon/charts').BaseChartOptions
20
- }>
21
- destroy: CustomEvent<null>
22
- } & {
23
- [evt: string]: CustomEvent<any>
24
- }
25
- slots: {}
26
- }
27
- export type CirclePackChartProps = typeof __propDef.props
28
- export type CirclePackChartEvents = typeof __propDef.events
29
- export type CirclePackChartSlots = typeof __propDef.slots
30
- export default class CirclePackChart extends SvelteComponentTyped<
31
- CirclePackChartProps,
32
- CirclePackChartEvents,
33
- CirclePackChartSlots
34
- > {}
35
- export {}
1
+ import { CirclePackChart as CirclePackChartCore, type CirclePackChartOptions } from '@carbon/charts'
2
+ import type { ChartProps } from './interfaces'
3
+ declare const CirclePackChart: import('svelte').Component<
4
+ ChartProps<CirclePackChartCore, CirclePackChartOptions>,
5
+ {},
6
+ 'ref' | 'chart'
7
+ >
8
+ type CirclePackChart = ReturnType<typeof CirclePackChart>
9
+ export default CirclePackChart
@@ -1,19 +1,25 @@
1
1
  <script>
2
2
  import { ComboChart as ComboChartCore } from '@carbon/charts'
3
3
  import BaseChart from './BaseChart.svelte'
4
- export let options
5
- export let data
6
- export let chart = undefined
7
- export let ref = undefined
4
+ let {
5
+ data,
6
+ options,
7
+ ref = $bindable(),
8
+ chart = $bindable(),
9
+ onload,
10
+ onupdate,
11
+ ondestroy,
12
+ ...rest
13
+ } = $props()
8
14
  </script>
9
15
 
10
16
  <BaseChart
11
- {...$$restProps}
12
17
  Chart={ComboChartCore}
13
18
  {options}
14
19
  {data}
15
20
  bind:ref
16
21
  bind:chart
17
- on:load
18
- on:update
19
- on:destroy />
22
+ {onload}
23
+ {onupdate}
24
+ {ondestroy}
25
+ {...rest} />
@@ -1,35 +1,9 @@
1
- import { SvelteComponentTyped } from 'svelte'
2
- import {
3
- ComboChart as ComboChartCore,
4
- type ComboChartOptions,
5
- type ChartTabularData
6
- } from '@carbon/charts'
7
- declare const __propDef: {
8
- props: {
9
- [x: string]: any
10
- options: ComboChartOptions
11
- data: ChartTabularData
12
- chart?: ComboChartCore | undefined
13
- ref?: HTMLDivElement | undefined
14
- }
15
- events: {
16
- load: CustomEvent<null>
17
- update: CustomEvent<{
18
- data: ChartTabularData
19
- options: import('@carbon/charts').BaseChartOptions
20
- }>
21
- destroy: CustomEvent<null>
22
- } & {
23
- [evt: string]: CustomEvent<any>
24
- }
25
- slots: {}
26
- }
27
- export type ComboChartProps = typeof __propDef.props
28
- export type ComboChartEvents = typeof __propDef.events
29
- export type ComboChartSlots = typeof __propDef.slots
30
- export default class ComboChart extends SvelteComponentTyped<
31
- ComboChartProps,
32
- ComboChartEvents,
33
- ComboChartSlots
34
- > {}
35
- export {}
1
+ import { ComboChart as ComboChartCore, type ComboChartOptions } from '@carbon/charts'
2
+ import type { ChartProps } from './interfaces'
3
+ declare const ComboChart: import('svelte').Component<
4
+ ChartProps<ComboChartCore, ComboChartOptions>,
5
+ {},
6
+ 'ref' | 'chart'
7
+ >
8
+ type ComboChart = ReturnType<typeof ComboChart>
9
+ export default ComboChart
@@ -1,19 +1,25 @@
1
1
  <script>
2
2
  import { DonutChart as DonutChartCore } from '@carbon/charts'
3
3
  import BaseChart from './BaseChart.svelte'
4
- export let options
5
- export let data
6
- export let chart = undefined
7
- export let ref = undefined
4
+ let {
5
+ data,
6
+ options,
7
+ ref = $bindable(),
8
+ chart = $bindable(),
9
+ onload,
10
+ onupdate,
11
+ ondestroy,
12
+ ...rest
13
+ } = $props()
8
14
  </script>
9
15
 
10
16
  <BaseChart
11
- {...$$restProps}
12
17
  Chart={DonutChartCore}
13
18
  {options}
14
19
  {data}
15
20
  bind:ref
16
21
  bind:chart
17
- on:load
18
- on:update
19
- on:destroy />
22
+ {onload}
23
+ {onupdate}
24
+ {ondestroy}
25
+ {...rest} />
@@ -1,35 +1,9 @@
1
- import { SvelteComponentTyped } from 'svelte'
2
- import {
3
- DonutChart as DonutChartCore,
4
- type DonutChartOptions,
5
- type ChartTabularData
6
- } from '@carbon/charts'
7
- declare const __propDef: {
8
- props: {
9
- [x: string]: any
10
- options: DonutChartOptions
11
- data: ChartTabularData
12
- chart?: DonutChartCore | undefined
13
- ref?: HTMLDivElement | undefined
14
- }
15
- events: {
16
- load: CustomEvent<null>
17
- update: CustomEvent<{
18
- data: ChartTabularData
19
- options: import('@carbon/charts').BaseChartOptions
20
- }>
21
- destroy: CustomEvent<null>
22
- } & {
23
- [evt: string]: CustomEvent<any>
24
- }
25
- slots: {}
26
- }
27
- export type DonutChartProps = typeof __propDef.props
28
- export type DonutChartEvents = typeof __propDef.events
29
- export type DonutChartSlots = typeof __propDef.slots
30
- export default class DonutChart extends SvelteComponentTyped<
31
- DonutChartProps,
32
- DonutChartEvents,
33
- DonutChartSlots
34
- > {}
35
- export {}
1
+ import { DonutChart as DonutChartCore, type DonutChartOptions } from '@carbon/charts'
2
+ import type { ChartProps } from './interfaces'
3
+ declare const DonutChart: import('svelte').Component<
4
+ ChartProps<DonutChartCore, DonutChartOptions>,
5
+ {},
6
+ 'ref' | 'chart'
7
+ >
8
+ type DonutChart = ReturnType<typeof DonutChart>
9
+ export default DonutChart
@@ -1,19 +1,25 @@
1
1
  <script>
2
2
  import { GaugeChart as GaugeChartCore } from '@carbon/charts'
3
3
  import BaseChart from './BaseChart.svelte'
4
- export let options
5
- export let data
6
- export let chart = undefined
7
- export let ref = undefined
4
+ let {
5
+ data,
6
+ options,
7
+ ref = $bindable(),
8
+ chart = $bindable(),
9
+ onload,
10
+ onupdate,
11
+ ondestroy,
12
+ ...rest
13
+ } = $props()
8
14
  </script>
9
15
 
10
16
  <BaseChart
11
- {...$$restProps}
12
17
  Chart={GaugeChartCore}
13
18
  {options}
14
19
  {data}
15
20
  bind:ref
16
21
  bind:chart
17
- on:load
18
- on:update
19
- on:destroy />
22
+ {onload}
23
+ {onupdate}
24
+ {ondestroy}
25
+ {...rest} />