@dilicorp/ui 0.0.74 → 0.0.76

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 +1 @@
1
- {"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/atoms/typography.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAG7C,oBAAY,eAAe,GAAG,cAAc,CAAC,kBAAkB,CAAC,GAAG;IACjE,OAAO,CAAC,EAAE,IAAI,GAAC,IAAI,GAAC,IAAI,GAAC,IAAI,GAAC,IAAI,GAAC,IAAI,CAAA;IACvC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,GAAG,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAA;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAyBhD,CAAA"}
1
+ {"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/atoms/typography.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAG7C,oBAAY,eAAe,GAAG,cAAc,CAAC,kBAAkB,CAAC,GAAG;IACjE,OAAO,CAAC,EAAE,IAAI,GAAC,IAAI,GAAC,IAAI,GAAC,IAAI,GAAC,IAAI,GAAC,IAAI,CAAA;IACvC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,GAAG,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAA;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA4BhD,CAAA"}
@@ -13,8 +13,9 @@ import React from 'react';
13
13
  import classNames from 'classnames';
14
14
  export const Typography = (_a) => {
15
15
  var { variant = 'h1', lineBottom, full, children, tag: Tag = variant, innerRef, className, subTitle } = _a, props = __rest(_a, ["variant", "lineBottom", "full", "children", "tag", "innerRef", "className", "subTitle"]);
16
- const classes = classNames('typography', className, variant, lineBottom && (full ? 'line-bottom-full' : 'line-bottom'), full && 'w-100');
16
+ const classes = classNames('typography', lineBottom && (full ? 'line-bottom-full' : 'line-bottom'), full && 'w-100');
17
+ const classeTag = classNames(className, variant);
17
18
  return (React.createElement("div", { className: classes },
18
- React.createElement(Tag, Object.assign({}, props, { ref: innerRef }), children),
19
+ React.createElement(Tag, Object.assign({}, props, { ref: innerRef, className: classeTag }), children),
19
20
  subTitle && React.createElement("div", { className: "sub-title" }, subTitle)));
20
21
  };
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import { ActionMeta, OnChangeValue } from 'react-select';
3
+ interface Options {
4
+ label: string;
5
+ value: number | string;
6
+ }
7
+ export interface GroupedOptions {
8
+ label: string;
9
+ options: Options[];
10
+ }
11
+ declare type FilterSelectProps = {
12
+ name: string;
13
+ placeholder: string;
14
+ groupedOptions?: GroupedOptions[];
15
+ id?: string;
16
+ value?: string | GroupedOptions | GroupedOptions[];
17
+ isDisabled?: boolean;
18
+ isLoading?: boolean;
19
+ isClearable?: boolean;
20
+ isSearchable?: boolean;
21
+ isMulti?: boolean;
22
+ onChange?: (newValue: OnChangeValue<any, any>, actionMeta: ActionMeta<any>) => void;
23
+ };
24
+ export declare const FilterSelectGroup: React.FC<FilterSelectProps>;
25
+ export {};
26
+ //# sourceMappingURL=filter-select-group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-select-group.d.ts","sourceRoot":"","sources":["../../../../src/components/page-list/filters/filter-select-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAoB,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAErE,UAAU,OAAO;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,EAAE,CAAA;CACnB;AAED,aAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,cAAc,EAAE,CAAA;IACjC,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,GAAC,cAAc,GAAC,cAAc,EAAE,CAAA;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,GAAG,CAAC,KAAK,IAAI,CAAA;CACpF,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA8CzD,CAAA"}
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import ReactSelect from 'react-select';
3
+ export const FilterSelectGroup = (props) => {
4
+ const { groupedOptions = [], name, id = name, placeholder, isDisabled = false, isLoading = false, isClearable = false, isSearchable = true, onChange } = props;
5
+ const handleChange = React.useCallback((event, action) => {
6
+ if (onChange) {
7
+ onChange({
8
+ target: {
9
+ name,
10
+ value: event
11
+ },
12
+ currentTarget: {
13
+ name,
14
+ value: JSON.stringify(event)
15
+ }
16
+ }, action);
17
+ }
18
+ }, []);
19
+ return (React.createElement("div", { className: "form-group" },
20
+ Boolean(placeholder) && React.createElement("label", { className: "form-label", htmlFor: name },
21
+ placeholder,
22
+ ":"),
23
+ React.createElement(ReactSelect, { placeholder: placeholder, className: "form-builder-select", classNamePrefix: "form-builder", options: groupedOptions, name: name, id: id, isDisabled: isDisabled, isLoading: isLoading, isClearable: isClearable, isSearchable: isSearchable, onChange: handleChange })));
24
+ };
@@ -1,4 +1,5 @@
1
1
  export { FilterInput as Input } from './filter-input';
2
2
  export { FilterSelect as Select } from './filter-select';
3
+ export { FilterSelectGroup as SelectGroup } from './filter-select-group';
3
4
  export { FilterDatepicker as Datepicker } from './filter-datepicker';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/page-list/filters/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,gBAAgB,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/page-list/filters/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,iBAAiB,IAAI,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxE,OAAO,EAAE,gBAAgB,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAA"}
@@ -1,3 +1,4 @@
1
1
  export { FilterInput as Input } from './filter-input';
2
2
  export { FilterSelect as Select } from './filter-select';
3
+ export { FilterSelectGroup as SelectGroup } from './filter-select-group';
3
4
  export { FilterDatepicker as Datepicker } from './filter-datepicker';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dilicorp/ui",
3
- "version": "0.0.74",
3
+ "version": "0.0.76",
4
4
  "description": "A simple UI design for Dilicorp",
5
5
  "repository": {
6
6
  "type": "git",