@bbodek/internal-ui 0.0.49 → 0.0.51
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/README.md +35 -3
- package/dist/{FilterCalendarPanel-CN37vf1y.js → FilterCalendarPanel-4xl_OsWr.js} +2 -2
- package/dist/FilterCalendarPanel-4xl_OsWr.js.map +1 -0
- package/dist/{FilterMultiSelectPanel-DNSZXfao.js → FilterMultiSelectPanel--nim2T0p.js} +2 -2
- package/dist/FilterMultiSelectPanel--nim2T0p.js.map +1 -0
- package/dist/{FilterSelectOptionPanel-8u41nHpi.js → FilterSelectOptionPanel-DzKuVOSi.js} +2 -2
- package/dist/FilterSelectOptionPanel-DzKuVOSi.js.map +1 -0
- package/dist/{index-By0wJuqk.js → index-BkLNoBKU.js} +2 -2
- package/dist/{index-By0wJuqk.js.map → index-BkLNoBKU.js.map} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{useFilterSelectOptionPanel-CS6hhKHO.js → useFilterSelectOptionPanel-Di10G2ZS.js} +2 -2
- package/dist/useFilterSelectOptionPanel-Di10G2ZS.js.map +1 -0
- package/package.json +6 -5
- package/dist/FilterCalendarPanel-CN37vf1y.js.map +0 -1
- package/dist/FilterMultiSelectPanel-DNSZXfao.js.map +0 -1
- package/dist/FilterSelectOptionPanel-8u41nHpi.js.map +0 -1
- package/dist/useFilterSelectOptionPanel-CS6hhKHO.js.map +0 -1
package/README.md
CHANGED
|
@@ -12,20 +12,52 @@ yarn add @bbodek/internal-ui
|
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
15
|
-
To install Tailwind CSS in your Next.js project
|
|
15
|
+
### 1. To install Tailwind CSS in your Next.js project
|
|
16
16
|
|
|
17
17
|
- [Using Pages Router](https://nextjs.org/docs/pages/guides/tailwind-css)
|
|
18
18
|
- [Using App Router](https://nextjs.org/docs/app/guides/tailwind-css#installing-tailwind)
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
### 2. Update your next config file
|
|
21
|
+
|
|
22
|
+
```javascript
|
|
23
|
+
/* next.config.js */
|
|
24
|
+
const nextConfig = {
|
|
25
|
+
webpack: (config) => {
|
|
26
|
+
config.resolve.fallback = { ...config.resolve.fallback, fs: false };
|
|
27
|
+
|
|
28
|
+
return config;
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 3. Update your global css file
|
|
34
|
+
|
|
35
|
+
#### Standalone Project
|
|
21
36
|
|
|
22
37
|
```css
|
|
38
|
+
/* global.css */
|
|
23
39
|
@import 'tailwindcss';
|
|
24
|
-
/* Add Here */
|
|
25
40
|
@import '@bbodek/internal-ui/styles';
|
|
26
41
|
@config '@bbodek/internal-ui/tailwind-config';
|
|
27
42
|
```
|
|
28
43
|
|
|
44
|
+
#### Monorepo Project
|
|
45
|
+
Create a local Tailwind config file
|
|
46
|
+
|
|
47
|
+
``` javascript
|
|
48
|
+
/* tailwind.config.js */
|
|
49
|
+
import config from '@bbodek/internal-ui/tailwind-config'
|
|
50
|
+
|
|
51
|
+
export default config;
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
```css
|
|
55
|
+
/* global.css */
|
|
56
|
+
@import 'tailwindcss';
|
|
57
|
+
@import '@bbodek/internal-ui/styles';
|
|
58
|
+
@config './tailwind.config.js'; /* Adjust the path as needed */
|
|
59
|
+
```
|
|
60
|
+
|
|
29
61
|
## Example
|
|
30
62
|
|
|
31
63
|
```tsx
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{useId as t}from"react";import{g as n,i as l,h as r,j as o,b as s,k as i}from"./index-
|
|
2
|
-
//# sourceMappingURL=FilterCalendarPanel-
|
|
1
|
+
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{useId as t}from"react";import{g as n,i as l,h as r,j as o,b as s,k as i}from"./index-BkLNoBKU.js";import"@bbodek/utils";import{F as m,u}from"./useFilterSelectOptionPanel-Di10G2ZS.js";import"react-dom";import"@bbodek/hooks";const d=()=>{const{variant:a,internalValue:t,handleChange:r}=n(),o=!l({value:t,variant:a});return e(m,{disabled:o,onClick:r})},c=({variant:n})=>{const l=t(),m=t(),{models:{calendarValue:c},operations:{onChange:h}}=(()=>{const{models:{value:e},operations:{handleChange:a}}=u(),{startDate:t,endDate:n}=null!==e?r({value:e}):{startDate:null,endDate:null};return{models:{calendarValue:null!==e?{startDate:t,endDate:n}:null},operations:{onChange:e=>{const t=e?[`${e.startDate}~${e.endDate}`]:null;a({value:t})}}}})();return e(o,{value:c,variant:n,onChange:h,children:a(s,{className:"in-tablet:min-w-[23.75rem] mx-auto w-[22.5rem] justify-between overflow-hidden",direction:"column",children:[e(i,{className:"in-tablet:min-h-[34svh-3.75rem] in-tablet:max-h-[46svh-3.75rem] mx-auto h-[100svh-4rem]",id:m,labelId:l}),e(d,{})]})})};export{c as default};
|
|
2
|
+
//# sourceMappingURL=FilterCalendarPanel-4xl_OsWr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterCalendarPanel-4xl_OsWr.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{useId as l}from"react";import{F as o,u as t}from"./useFilterSelectOptionPanel-
|
|
2
|
-
//# sourceMappingURL=FilterMultiSelectPanel
|
|
1
|
+
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{useId as l}from"react";import{F as o,u as t}from"./useFilterSelectOptionPanel-Di10G2ZS.js";import{a as n,M as s,b as i,c as r,e as m,f as c}from"./index-BkLNoBKU.js";import"react-dom";import"@bbodek/hooks";import"@bbodek/utils";const u=()=>{const{onChange:a,onSearch:l,internalOptions:t}=n();return e(o,{disabled:0===t.length||void 0===t.find((({isSelected:e})=>e)),onClick:()=>{l({value:null}),a()}})},d=()=>{const o=l(),n=l(),d=l(),{models:{value:p,options:h},operations:{onChange:v}}=(()=>{const{models:{options:e,value:a},operations:{handleChange:l}}=t(),o=e.options.map((({value:e,displayValue:a})=>({value:e,label:a})));return{models:{value:(a??[]).map((e=>({value:e,label:o.find((a=>a.value===e))?.label??""}))),options:o},operations:{onChange:e=>{const a=e?e.map((({value:e})=>e)):null;l({value:a})}}}})();return e(s,{options:h,selectListResultId:n,selectedListResultId:d,value:p,onChange:v,children:a(i,{className:"in-tablet:min-w-[36.25rem] mx-auto w-[22.5rem] flex-1 justify-between overflow-hidden",direction:"column",children:[e(r,{className:"in-tablet:min-h-[calc(34svh-3.75rem)] in-tablet:max-h-[calc(46svh-3.75rem)] h-[100svh-4rem]",labelId:o,searchPanel:e(c,{}),selectedPanel:e(m,{})}),e(u,{})]})})};export{d as default};
|
|
2
|
+
//# sourceMappingURL=FilterMultiSelectPanel--nim2T0p.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterMultiSelectPanel--nim2T0p.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{u as r,F as e,d as o,C as s}from"./index-
|
|
2
|
-
//# sourceMappingURL=FilterSelectOptionPanel-
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{u as r,F as e,d as o,C as s}from"./index-BkLNoBKU.js";import"react";import"@bbodek/utils";import"react-dom";import"@bbodek/hooks";const a=o((()=>import("./FilterMultiSelectPanel--nim2T0p.js")),{ssr:!1}),i=o((()=>import("./FilterCalendarPanel-4xl_OsWr.js")),{ssr:!1}),m=()=>{const{currentOptions:o}=r(),{type:m}=o;return{[e.MULTI_SELECT]:t(a,{}),[e.DATE_SINGLE]:t(i,{variant:s.SINGLE}),[e.DATE_RANGE]:t(i,{variant:s.RANGE})}[m]};export{m as default};
|
|
2
|
+
//# sourceMappingURL=FilterSelectOptionPanel-DzKuVOSi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterSelectOptionPanel-DzKuVOSi.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|