coles-solid-library 0.0.1 → 0.0.8

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.
@@ -1,5 +1,4 @@
1
1
  import { Component, JSX } from "solid-js";
2
- import "./Button.scss";
3
2
  export interface MenuButton {
4
3
  name: string;
5
4
  condition?: () => boolean;
@@ -1,5 +1,9 @@
1
1
  import { Accessor, Component, JSX, Setter } from "solid-js";
2
- import "./Carosel.module.scss";
2
+ export interface ProviderProps<T> {
3
+ children: JSX.Element;
4
+ value?: T;
5
+ }
6
+ export declare const carouselTitleContext: import("solid-js").Context<[Accessor<string[]>, Setter<string[]>]>;
3
7
  export interface CarouselElement {
4
8
  name: string;
5
9
  element: JSX.Element;
@@ -10,6 +14,12 @@ interface CarouselProps {
10
14
  notFoundName?: string;
11
15
  currentIndex?: [Accessor<number>, Setter<number>];
12
16
  }
13
- declare const Carousel: Component<CarouselProps>;
17
+ interface CaroselSlideProps {
18
+ startingIndex?: number;
19
+ currentIndex?: [Accessor<number>, Setter<number>];
20
+ notFoundName?: string;
21
+ children: JSX.Element | JSX.Element[];
22
+ }
23
+ declare const Carousel: Component<CarouselProps | CaroselSlideProps>;
14
24
  export { Carousel };
15
25
  export default Carousel;
@@ -0,0 +1,7 @@
1
+ import { Component, JSX } from "solid-js";
2
+ interface SlideProps {
3
+ title: string;
4
+ children?: JSX.Element | JSX.Element[];
5
+ }
6
+ export declare const Slide: Component<SlideProps>;
7
+ export {};
@@ -1,11 +1,11 @@
1
1
  import { Component } from "solid-js";
2
- import "./Chip.module.scss";
3
2
  interface Props {
4
3
  class?: string;
5
4
  key?: string;
6
5
  value: string;
7
6
  remove?: () => any;
8
7
  onClick?: (e: MouseEvent) => any;
8
+ styleType?: "primary" | "accent" | "tertiary";
9
9
  }
10
10
  declare const Chip: Component<Props>;
11
11
  export { Chip };
@@ -1,5 +1,4 @@
1
- import { Accessor, Component, Setter } from "solid-js";
2
- import "./chipbar.module.scss";
1
+ import { Accessor, JSX, Setter } from "solid-js";
3
2
  export interface ChipType {
4
3
  key: string;
5
4
  value: string;
@@ -8,6 +7,11 @@ interface Props {
8
7
  chips: Accessor<ChipType[]>;
9
8
  setChips?: Setter<ChipType[]>;
10
9
  }
11
- declare const Chipbar: Component<Props>;
10
+ interface InsideChipsProps {
11
+ children: JSX.Element[] | JSX.Element;
12
+ clearAll?: Setter<any[]>;
13
+ }
14
+ declare function Chipbar(props: Props): JSX.Element;
15
+ declare function Chipbar(props: InsideChipsProps): JSX.Element;
12
16
  export { Chipbar };
13
17
  export default Chipbar;
@@ -1,5 +1,4 @@
1
1
  import { Component, JSX } from "solid-js";
2
- import './body.module.scss';
3
2
  import { CSSModuleClasses } from "../cssmodule";
4
3
  interface Props extends JSX.HTMLAttributes<HTMLDivElement> {
5
4
  children: JSX.Element | JSX.Element[];
@@ -1,5 +1,4 @@
1
1
  import { Component, JSX } from "solid-js";
2
- import "./formfield.module.scss";
3
2
  interface Props extends JSX.FieldsetHTMLAttributes<HTMLFieldSetElement> {
4
3
  children: JSX.Element;
5
4
  styleType?: "primary" | "accent" | "tertiary";
@@ -1,5 +1,4 @@
1
1
  import { Component, JSX } from "solid-js";
2
- import "./input.module.scss";
3
2
  interface InputProps extends JSX.InputHTMLAttributes<HTMLInputElement> {
4
3
  tooltip?: string;
5
4
  transparent?: boolean;
@@ -1,5 +1,4 @@
1
1
  import { JSX } from "solid-js";
2
- import './selectStyles.scss';
3
2
  interface OptionProps<T> {
4
3
  value: T;
5
4
  children?: JSX.Element;
@@ -1,11 +1,11 @@
1
1
  import { JSX } from "solid-js";
2
- import './selectStyles.scss';
3
2
  interface SelectContextValue<T> {
4
3
  isSelected: (val: T) => boolean;
5
4
  selectValue: (val: T) => void;
6
5
  registerOption?: (val: T, label: JSX.Element) => void;
7
6
  unregisterOption?: (val: T) => void;
8
7
  selectRef?: (val: HTMLDivElement | undefined) => HTMLDivElement | undefined;
8
+ selectStyle?: () => string;
9
9
  }
10
10
  export declare const SelectContext: import("solid-js").Context<SelectContextValue<any> | undefined>;
11
11
  interface SelectProps<T = string, K = boolean> {
@@ -1,5 +1,4 @@
1
1
  import { Component } from "solid-js";
2
- import "./snackbar.module.scss";
3
2
  export interface Snackbar {
4
3
  message: string;
5
4
  severity?: "error" | "warning" | "info" | "success";
@@ -1,6 +1,4 @@
1
1
  import { Accessor, Component, JSX, Setter } from "solid-js";
2
- import { Tab } from "./tab";
3
- import "./tabs.module.scss";
4
2
  interface ITabStore {
5
3
  [name: string]: JSX.Element;
6
4
  }
@@ -14,5 +12,11 @@ interface Props {
14
12
  styleType?: "primary" | "accent" | "tertiary";
15
13
  transparent?: boolean;
16
14
  }
15
+ interface TabProps {
16
+ children: JSX.Element;
17
+ name: string;
18
+ hidden?: Accessor<boolean>;
19
+ }
20
+ declare const Tab: Component<TabProps>;
17
21
  export { Tab, Tabs };
18
22
  export default Tabs;
@@ -1,5 +1,4 @@
1
1
  import { Accessor, Component, JSX, Setter } from "solid-js";
2
- import './TextArea.module.scss';
3
2
  interface Props extends JSX.TextareaHTMLAttributes<HTMLTextAreaElement> {
4
3
  text: Accessor<string>;
5
4
  setText: Setter<string>;
@@ -1,5 +1,4 @@
1
1
  import { type Component, JSX } from "solid-js";
2
- import './expansion.module.scss';
3
2
  type Props = {
4
3
  children: [JSX.Element, JSX.Element];
5
4
  styles?: {
@@ -7,6 +6,7 @@ type Props = {
7
6
  };
8
7
  extraLogic?: () => void;
9
8
  startOpen?: boolean;
9
+ styleType?: "primary" | "accent" | "tertiary";
10
10
  [key: string]: any;
11
11
  arrowSize?: {
12
12
  width: string;
@@ -1,6 +1,7 @@
1
1
  import { Accessor, Component, JSX, Setter } from "solid-js";
2
2
  type Props = {
3
- title?: string;
3
+ title: string;
4
+ show: [Accessor<boolean>, Setter<boolean>];
4
5
  children?: JSX.Element;
5
6
  width?: string;
6
7
  height?: string;
@@ -8,7 +9,7 @@ type Props = {
8
9
  x?: string;
9
10
  y?: string;
10
11
  };
11
- backgroundClick?: [Accessor<boolean>, Setter<boolean>];
12
+ styleType?: "primary" | "accent" | "tertiary";
12
13
  setClose?: Setter<boolean>;
13
14
  ref?: Accessor<HTMLDivElement | undefined>;
14
15
  };
@@ -23,7 +24,7 @@ type Props = {
23
24
  * @param backgroundClick [Accessor <bool>, Setter <bool>] - A signal and setter for enabling the background click.
24
25
  * @returns - A Modal component.
25
26
  */
26
- declare const Modal: Component<Props>;
27
+ export declare const Modal: Component<Props>;
27
28
  declare module "solid-js" {
28
29
  namespace JSX {
29
30
  interface Directives {
@@ -31,4 +32,4 @@ declare module "solid-js" {
31
32
  }
32
33
  }
33
34
  }
34
- export default Modal;
35
+ export {};
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  export * from './components/Button/Button';
2
+ export * from './components/Carosel/Carosel';
3
+ export * from './components/Carosel/Slide';
2
4
  export * from './components/Chip/Chip';
3
5
  export * from './components/Chipbar/chipbar';
4
6
  export * from './components/ComponentBody/body.component';
@@ -10,6 +12,7 @@ export * from './components/Snackbar/snackbar';
10
12
  export * from './components/Table/table';
11
13
  export * from './components/popup/popup.component';
12
14
  export * from './components/Tabs/tabs';
13
- export * from './components/Tabs/tab';
14
15
  export * from './components/TextArea/TextArea';
15
16
  export * from './components/expansion/expansion';
17
+ export * from './components/popup/popup.component';
18
+ export { addTheme } from './tools';