@nimbus-ds/select 1.0.0-rc.1

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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,25 @@
1
+ # Changelog
2
+
3
+ Use a select box when a user needs to select one option from a list.
4
+
5
+ ## 2022-10-14
6
+
7
+ ### 📚 3rd party library updates
8
+
9
+ - Added `terser-webpack-plugin@5.3.5`. ([#39](https://github.com/TiendaNube/nimbus-design-system/pull/39) by [@juanchigallego](https://github.com/juanchigallego))
10
+ - Added `ts-loader@9.3.1`. ([#39](https://github.com/TiendaNube/nimbus-design-system/pull/39) by [@juanchigallego](https://github.com/juanchigallego))
11
+ - Added `typescript@4.7.4`. ([#39](https://github.com/TiendaNube/nimbus-design-system/pull/39) by [@juanchigallego](https://github.com/juanchigallego))
12
+ - Added `webpack@5.74.0`. ([#39](https://github.com/TiendaNube/nimbus-design-system/pull/39) by [@juanchigallego](https://github.com/juanchigallego))
13
+ - Added `webpack-cli@4.10.0`. ([#39](https://github.com/TiendaNube/nimbus-design-system/pull/39) by [@juanchigallego](https://github.com/juanchigallego))
14
+
15
+ ### 🎉 New features
16
+
17
+ - Added `name`, `id` and `children` properties to the component. ([#39](https://github.com/TiendaNube/nimbus-design-system/pull/39) by [@juanchigallego](https://github.com/juanchigallego))
18
+ - Added stories on component. ([#39](https://github.com/TiendaNube/nimbus-design-system/pull/39) by [@juanchigallego](https://github.com/juanchigallego))
19
+ - Created new `Select.Group` subcomponent. ([#39](https://github.com/TiendaNube/nimbus-design-system/pull/39) by [@juanchigallego](https://github.com/juanchigallego))
20
+ - Added `label` and `children` properties to the component `Select.Group`. ([#39](https://github.com/TiendaNube/nimbus-design-system/pull/39) by [@juanchigallego](https://github.com/juanchigallego))
21
+ - Created new `Select.Option` subcomponent. ([#39](https://github.com/TiendaNube/nimbus-design-system/pull/39) by [@juanchigallego](https://github.com/juanchigallego))
22
+ - Added `disabled`, `select`, `label` and `value` to the component `Select.Option`. ([#39](https://github.com/TiendaNube/nimbus-design-system/pull/39) by [@juanchigallego](https://github.com/juanchigallego))
23
+ - Created new `Select.Skeleton` subcomponent. ([#39](https://github.com/TiendaNube/nimbus-design-system/pull/39) by [@juanchigallego](https://github.com/juanchigallego))
24
+ - Added `width` property to the component `Select.Skeleton`. ([#39](https://github.com/TiendaNube/nimbus-design-system/pull/39) by [@juanchigallego](https://github.com/juanchigallego))
25
+ - Added stories on component `Select.Skeleton`. ([#39](https://github.com/TiendaNube/nimbus-design-system/pull/39) by [@juanchigallego](https://github.com/juanchigallego))
package/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # `@nimbus-ds/select`
2
+
3
+ [![@nimbus-ds/select](https://img.shields.io/npm/v/@nimbus-ds/select?select=%40nimbus-ds%2Fselect)](https://www.npmjs.com/package/@nimbus-ds/select)
4
+
5
+ Use a select box when a user needs to select one option from a list.
6
+
7
+ ## Installation
8
+
9
+ ```sh
10
+ $ yarn add @nimbus-ds/select
11
+ # or
12
+ $ npm install @nimbus-ds/select
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ View docs [here](https://nimbus.nuvemshop.com.br/documentation/atomic-components/select).
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { SelectComponents, SelectProps } from "./select.types";
3
+ declare const Select: React.FC<SelectProps> & SelectComponents;
4
+ export { Select };
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { GroupProps } from "./group.types";
3
+ declare const Group: React.FC<GroupProps>;
4
+ export { Group };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ import { OptgroupHTMLAttributes, ReactNode } from "react";
2
+ export interface GroupProps extends OptgroupHTMLAttributes<HTMLOptGroupElement> {
3
+ /** Option group label */
4
+ label: string;
5
+ /** Elements to be rendered inside the option group */
6
+ children: ReactNode;
7
+ }
@@ -0,0 +1,3 @@
1
+ import { Group } from "./Group";
2
+ export { Group } from "./Group";
3
+ export default Group;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { OptionProps } from "./option.types";
3
+ declare const Option: React.FC<OptionProps>;
4
+ export { Option };
@@ -0,0 +1,3 @@
1
+ import { Option } from "./Option";
2
+ export { Option } from "./Option";
3
+ export default Option;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import { OptionHTMLAttributes } from "react";
2
+ export interface OptionProps extends OptionHTMLAttributes<HTMLOptionElement> {
3
+ /** Indicates if option is disabled for selection */
4
+ disabled?: boolean;
5
+ /** Indicates if option is selected by default */
6
+ selected?: boolean;
7
+ /** Optional label for the option */
8
+ label?: string;
9
+ /** Value of the option */
10
+ value?: string;
11
+ }
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { SkeletonProps } from "./skeleton.types";
3
+ declare const Skeleton: React.FC<SkeletonProps>;
4
+ export { Skeleton };
@@ -0,0 +1,3 @@
1
+ import { Skeleton } from "./Skeleton";
2
+ export { Skeleton } from "./Skeleton";
3
+ export default Skeleton;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { ComponentMeta, ComponentStory } from "@storybook/react";
3
+ declare const _default: ComponentMeta<React.FC<import("./skeleton.types").SkeletonProps>>;
4
+ export default _default;
5
+ export declare const select: ComponentStory<React.FC<import("./skeleton.types").SkeletonProps>>;
@@ -0,0 +1,4 @@
1
+ import { SkeletonProps as SkeletonBaseProps } from "@nimbus-ds/skeleton";
2
+ export declare type SkeletonProps = Partial<Pick<SkeletonBaseProps, "width">> & {
3
+ "data-testid"?: string;
4
+ };
@@ -0,0 +1,3 @@
1
+ export * from "./Group";
2
+ export * from "./Option";
3
+ export * from "./Skeleton";
@@ -0,0 +1,5 @@
1
+ import { Select } from "./Select";
2
+ import "@nimbus-ds/styles/packages/select/index.css";
3
+ export { Select } from "./Select";
4
+ export type { SelectProps } from "./select.types";
5
+ export default Select;