@sps-woodland/list-bar 8.0.0-rc1

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.
@@ -0,0 +1,3 @@
1
+ import * as React from "react";
2
+ import { ComponentProps } from "@sps-woodland/core";
3
+ export declare function InputGroupWrapper({ children, }: ComponentProps<unknown, HTMLElement>): React.ReactElement;
@@ -0,0 +1,38 @@
1
+ export declare const listBarWrapper: string;
2
+ export declare const listBar: import("@vanilla-extract/recipes/dist/declarations/src/types").RuntimeFn<{
3
+ pinned: {
4
+ true: {
5
+ width: string;
6
+ borderRadius: number;
7
+ marginLeft: `calc(-${string} / 4)`;
8
+ position: "fixed";
9
+ top: string;
10
+ zIndex: number;
11
+ selectors: {
12
+ "&:after": {
13
+ background: "linear-gradient(180deg, rgba(0, 0, 0, 0.1), transparent)";
14
+ content: "";
15
+ display: "block";
16
+ height: string;
17
+ left: `-${string}`;
18
+ position: "absolute";
19
+ top: "calc(100% + 1px)";
20
+ width: string;
21
+ };
22
+ };
23
+ };
24
+ false: {};
25
+ };
26
+ }>;
27
+ export declare const listBarContent: string;
28
+ export declare const listBarSelectionControls: string;
29
+ export declare const listBarSearchControls: string;
30
+ export declare const listBarAdvSearchToggle: string;
31
+ export declare const listBarAdvSearchToggleWrapper: string;
32
+ export declare const listBarAdvSearchEnteredFields: string;
33
+ export declare const listBarAdvSearchTitle: string;
34
+ export declare const listBarHeaderContent: string;
35
+ export declare const listBarSearchForm: string;
36
+ export declare const listBarSearchField: string;
37
+ export declare const inputGroupIconButton: string;
38
+ export declare const listBarSortBy: string;
@@ -0,0 +1,17 @@
1
+ import * as React from "react";
2
+ import { ComponentProps } from "@sps-woodland/core";
3
+ export declare function ListBar({ advancedSearch, onToggleAdvancedSearch, title, onToolbarPinned, selectable, isSelected, isIndeterminate, onSelectionChange, pinResultsBar, pinToolbar, children, className, ...rest }: ComponentProps<{
4
+ advancedSearch?: {
5
+ isOpen: boolean;
6
+ enteredFields?: number;
7
+ };
8
+ onToggleAdvancedSearch?: (arg: boolean) => void;
9
+ title?: string;
10
+ onToolbarPinned?: (arg: boolean) => void;
11
+ selectable?: boolean;
12
+ isSelected?: boolean;
13
+ isIndeterminate?: boolean;
14
+ onSelectionChange?: (arg: boolean) => void;
15
+ pinResultsBar?: boolean;
16
+ pinToolbar?: boolean;
17
+ }, HTMLDivElement>): React.ReactElement;
@@ -0,0 +1,3 @@
1
+ import type { ComponentManifestEntry } from "@sps-woodland/core";
2
+ export declare function ContentOrderExample(): JSX.Element;
3
+ export declare const ListBarExamples: ComponentManifestEntry;
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ import { ComponentProps } from "@sps-woodland/core";
3
+ export declare function ListBarSearch({ onSubmit, children, }: ComponentProps<{
4
+ onSubmit?: React.FormEventHandler;
5
+ }, HTMLElement>): React.ReactElement;
@@ -0,0 +1,3 @@
1
+ import * as React from "react";
2
+ import { ComponentProps } from "@sps-woodland/core";
3
+ export declare function ListBarSearchInfo({ children, }: ComponentProps<unknown, HTMLDivElement>): React.ReactElement;
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ import { ComponentProps, SortDirection } from "@sps-woodland/core";
3
+ import { SpsIcon } from "@spscommerce/ds-shared";
4
+ export interface SortOption {
5
+ label: string;
6
+ key: string;
7
+ direction: SortDirection;
8
+ icon: SpsIcon;
9
+ }
10
+ export declare function ListBarSortBy({ options, activeOption, onSortChange, defaultOption, className, ...rest }: ComponentProps<{
11
+ options?: SortOption[];
12
+ activeOption?: SortOption;
13
+ onSortChange?: (option: SortOption) => void;
14
+ defaultOption?: SortOption;
15
+ }, HTMLElement>): React.ReactElement;
@@ -0,0 +1,2 @@
1
+ import type { ComponentManifest } from "@sps-woodland/core";
2
+ export declare const MANIFEST: ComponentManifest;
@@ -0,0 +1,9 @@
1
+ export declare const searchResultsBarWrapper: string;
2
+ export declare const searchResultsBar: string;
3
+ export declare const searchResultsBarResults: string;
4
+ export declare const searchResutlsBarResultsTag: string;
5
+ export declare const searchResultsBarSelections: string;
6
+ export declare const searchResultsBarSelection: string;
7
+ export declare const searchResultsBarSelectionTag: string;
8
+ export declare const searchResultsBarButtons: string;
9
+ export declare const searchResultsBarButton: string;
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import { ComponentProps } from "@sps-woodland/core";
3
+ export declare function SearchResultsBar({ results, selections, zeroStateText, onClear, className, children, ...rest }: ComponentProps<{
4
+ results?: number | null;
5
+ selections?: {
6
+ [key: string]: string[];
7
+ };
8
+ zeroStateText?: string;
9
+ onClear?: () => void;
10
+ }, HTMLDivElement>): React.ReactElement;
@@ -0,0 +1,2 @@
1
+ import type { ComponentManifestEntry } from "@sps-woodland/core";
2
+ export declare const SearchResultsBarExamples: ComponentManifestEntry;
package/lib/style.css ADDED
@@ -0,0 +1 @@
1
+ ._9h4p701{background:#ffffff;border-color:#d2d4d4;border-style:solid;border-width:.0625rem;border-radius:.25rem;display:flex;flex-flow:column wrap;margin-top:0;margin-right:0;margin-bottom:.5rem;margin-left:0;position:relative}._9h4p702{width:75rem;border-radius:0;margin-left:-18.75rem;position:fixed;top:3.75rem;z-index:999}._9h4p702:after{content:"";background:linear-gradient(180deg,rgba(0,0,0,.1),transparent);display:block;height:.625rem;left:-.0625rem;position:absolute;top:calc(100% + 1px);width:75rem}._9h4p704{display:flex;flex-wrap:wrap;padding:.5rem}._9h4p705{display:flex;align-items:center;border-right-color:#d2d4d4;border-right-style:solid;border-right-width:.0625rem;padding:1rem;margin:-.5rem .5rem -.5rem -.5rem}._9h4p706{align-items:center;display:inline-flex;flex:1 0 auto;height:2rem;vertical-align:middle}._9h4p707{padding-top:.25rem;padding-right:0;padding-bottom:.25rem;padding-left:0;white-space:nowrap}._9h4p708{display:inline-block;position:relative}._9h4p709{margin-left:.25rem}._9h4p70a{align-items:center;display:flex;float:left;font-size:.75rem;font-weight:600;line-height:1.5rem;margin-bottom:0;padding-left:.5rem;text-transform:uppercase}._9h4p70b{display:inline-block;height:2rem;margin-left:.5rem;text-align:right;vertical-align:middle;white-space:nowrap}._9h4p70c{flex:1;margin-right:.25rem;max-width:25rem}._9h4p70e{background-color:#e9e9ea;border-color:#717779;border-width:.0625rem;border-style:solid;border-bottom-left-radius:0;border-bottom-right-radius:.25rem;border-top-left-radius:0;border-top-right-radius:.25rem;border-left-width:0}._9h4p70e:hover{background-color:#d2d4d4;border-width:.0625rem;border-style:solid;border-color:#717779;border-left-width:0}._9h4p70f>.sps-button{margin:0!important;background:transparent;border-color:transparent;color:#4b5356}._9h4p70f>.sps-button>button{padding:.25rem}._9h4p70e>button{height:1.875rem}._9h4p70a>i{font-size:.875rem;margin-right:.25rem}._9h4p70d>.sps-autocomplete{flex:1}._9h4p70d>.sps-input-group>.sps-select{min-width:30%}._9h4p70d>.sps-input-group>.sps-select:not(:last-child)>.sps-select__dropctrl{height:2rem;line-height:2rem;border-bottom-right-radius:0;border-top-right-radius:0}._9h4p70d>.sps-input-group>.sps-autocomplete:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}._9h4p70d>.sps-input-group>.sps-autocomplete:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}._9h4p70d>.sps-input-group>.sps-text-input:not(:last-child)>.sps-form-control{border-bottom-right-radius:0;border-top-right-radius:0}._9h4p70d>.sps-input-group>.sps-text-input:not(:first-child):not(:only-child)>.sps-form-control{border-bottom-left-radius:0;border-left:0;border-top-left-radius:0}._1gxdcgc1{background-color:#e9e9ea;border-width:.0625rem;border-color:#d2d4d4;border-style:solid;border-radius:.25rem;display:flex;min-height:3.25rem}._9h4p701>._1gxdcgc0>._1gxdcgc1{border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:.125rem;border-bottom-right-radius:.125rem;border-top-width:.0625rem;border-right-width:0;border-bottom-width:0;border-left-width:0}._1gxdcgc2{flex:1 1 auto;border-right-width:.0625rem;border-right-color:#d2d4d4;border-right-style:solid;padding:.5rem;display:flex;align-items:center}._1gxdcgc3{margin-left:.25rem}._1gxdcgc4{flex:1 1 100%;padding:.5rem;display:flex;align-items:center;flex-wrap:wrap}._1gxdcgc5{margin-top:0;margin-bottom:0;margin-right:.25rem;margin-left:.25rem}._1gxdcgc5:first-child{margin-left:0}._1gxdcgc6{margin-top:.125rem;margin-bottom:.125rem;margin-right:.25rem}._1gxdcgc6:last-child{margin-right:0}._1gxdcgc7{flex:1 1 auto;border-left-width:.0625rem;border-left-style:solid;border-left-color:#d2d4d4;display:flex;align-items:center}._1gxdcgc7:hover{background:#d2d4d4}._1gxdcgc8{padding:.5rem;width:5.25rem}.q4fj410{background:#ffffff;border-color:#d2d4d4;border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem;border-style:solid;border-top-width:0;border-right-width:.0625rem;border-bottom-width:.0625rem;border-left-width:.0625rem;display:none;margin-top:-.625rem;margin-right:0;margin-bottom:1rem;margin-left:0}.q4fj411{display:block}.q4fj413{padding:1rem}.q4fj414{background:#f3f4f4;border-top-left-radius:undefined;border-top-right-radius:undefined;border-bottom-left-radius:undefined;border-bottom-right-radius:undefined;display:flex;padding:.5rem}.q4fj415{text-align:right}.q4fj414>*{flex:1}
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@sps-woodland/list-bar",
3
+ "description": "SPS Woodland Design System list bar components",
4
+ "version": "8.0.0-rc1",
5
+ "author": "SPS Commerce",
6
+ "license": "UNLICENSED",
7
+ "repository": "https://github.com/SPSCommerce/woodland/tree/main/packages/@sps-woodland/list-bar",
8
+ "homepage": "https://github.com/SPSCommerce/woodland/tree/master/packages/@sps-woodland/list-bar#readme",
9
+ "main": "./lib/index.es.js",
10
+ "module": "./lib/index.es.js",
11
+ "types": "./lib/index.d.ts",
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "peerDependencies": {
16
+ "@spscommerce/utils": "^6.12.1",
17
+ "react": "^16.9.0",
18
+ "react-dom": "^16.9.0",
19
+ "@sps-woodland/core": "8.0.0-rc1",
20
+ "@sps-woodland/tokens": "8.0.0-rc1",
21
+ "@sps-woodland/tabs": "8.0.0-rc1",
22
+ "@sps-woodland/buttons": "8.0.0-rc1",
23
+ "@sps-woodland/tags": "8.0.0-rc1",
24
+ "@spscommerce/ds-react": "8.0.0-rc1"
25
+ },
26
+ "devDependencies": {
27
+ "@react-stately/collections": "^3.3.3",
28
+ "@spscommerce/utils": "^6.12.1",
29
+ "@vanilla-extract/css": "^1.9.3",
30
+ "@vanilla-extract/recipes": "^0.2.5",
31
+ "react": "^16.9.0",
32
+ "react-dom": "^16.9.0",
33
+ "@sps-woodland/core": "8.0.0-rc1",
34
+ "@sps-woodland/tokens": "8.0.0-rc1",
35
+ "@sps-woodland/buttons": "8.0.0-rc1",
36
+ "@spscommerce/ds-react": "8.0.0-rc1",
37
+ "@spscommerce/ds-shared": "8.0.0-rc1",
38
+ "@sps-woodland/tabs": "8.0.0-rc1",
39
+ "@sps-woodland/tags": "8.0.0-rc1"
40
+ },
41
+ "scripts": {
42
+ "build": "pnpm run build:js && pnpm run build:types",
43
+ "build:js": "vite build",
44
+ "build:types": "tsc --emitDeclarationOnly --declaration --declarationDir lib",
45
+ "watch": "vite build --watch",
46
+ "clean": "git clean -fdX",
47
+ "pub": "node ../../../scripts/publish-package.js"
48
+ }
49
+ }
package/vite.config.js ADDED
@@ -0,0 +1,21 @@
1
+ import path from "path";
2
+ import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
3
+ import { defineConfig } from "vite";
4
+
5
+ import pkg from "./package.json";
6
+
7
+ export default defineConfig({
8
+ plugins: [vanillaExtractPlugin()],
9
+ build: {
10
+ lib: {
11
+ entry: path.resolve(__dirname, "src/index.ts"),
12
+ formats: ["es", "cjs"],
13
+ fileName: (format) => `index.${format}.js`,
14
+ },
15
+ outDir: path.resolve(__dirname, "./lib"),
16
+ emptyOutDir: false,
17
+ rollupOptions: {
18
+ external: pkg.peerDependencies ? Object.keys(pkg.peerDependencies) : [],
19
+ },
20
+ },
21
+ });