sccoreui 2.1.3 → 2.1.5
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/dist/App.js +1 -0
- package/dist/assets/sccoreui.css +7 -4
- package/dist/components/toast/toast.js +4 -0
- package/dist/index.js +3 -1
- package/dist/pages/color-picker/color-picker.js +13 -0
- package/dist/pages/dropdown/dropdown-component.js +38 -0
- package/dist/pages/home.js +12 -0
- package/dist/pages/input/input-text.js +20 -0
- package/dist/pages/types/type.js +2 -0
- package/dist/types/components/toast/toast.d.ts +2 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/pages/color-picker/color-picker.d.ts +2 -0
- package/dist/types/pages/dropdown/dropdown-component.d.ts +2 -0
- package/dist/types/pages/home.d.ts +2 -0
- package/dist/types/pages/input/input-text.d.ts +2 -0
- package/dist/types/pages/types/type.d.ts +4 -0
- package/package.json +1 -1
package/dist/App.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
4
|
// import Home from './pages/home';
|
|
5
|
+
// import { InputNumber } from 'primereact/inputnumber';
|
|
5
6
|
require("./App.scss");
|
|
6
7
|
const App = () => {
|
|
7
8
|
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("div", {}) }));
|
package/dist/assets/sccoreui.css
CHANGED
|
@@ -849,7 +849,8 @@ a {
|
|
|
849
849
|
box-shadow 0.2s;
|
|
850
850
|
border-radius: 8px;
|
|
851
851
|
box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05);
|
|
852
|
-
padding: 10px
|
|
852
|
+
padding: 5px 10px 0px 15px;
|
|
853
|
+
height: 40px;
|
|
853
854
|
}
|
|
854
855
|
.p-inputgroup > .p-dropdown {
|
|
855
856
|
background: #ffffff;
|
|
@@ -921,6 +922,7 @@ a {
|
|
|
921
922
|
color: #444b74;
|
|
922
923
|
height: 20px;
|
|
923
924
|
width: 20px;
|
|
925
|
+
padding-top: 6px;
|
|
924
926
|
}
|
|
925
927
|
.p-inputgroup > .p-dropdown .p-dropdown-trigger {
|
|
926
928
|
width: 1rem;
|
|
@@ -2162,6 +2164,7 @@ a {
|
|
|
2162
2164
|
box-shadow 0.2s;
|
|
2163
2165
|
border-radius: 8px;
|
|
2164
2166
|
border: none;
|
|
2167
|
+
width: auto;
|
|
2165
2168
|
}
|
|
2166
2169
|
|
|
2167
2170
|
.p-primary-50 {
|
|
@@ -5332,7 +5335,7 @@ a {
|
|
|
5332
5335
|
border: 1px solid #ccc;
|
|
5333
5336
|
}
|
|
5334
5337
|
.p-card .p-card-body {
|
|
5335
|
-
padding: 0px
|
|
5338
|
+
padding: 0px;
|
|
5336
5339
|
}
|
|
5337
5340
|
.p-card .p-card-title {
|
|
5338
5341
|
font-size: 1.5rem;
|
|
@@ -5346,10 +5349,10 @@ a {
|
|
|
5346
5349
|
color: #6c757d;
|
|
5347
5350
|
}
|
|
5348
5351
|
.p-card .p-card-content {
|
|
5349
|
-
padding: 24px;
|
|
5352
|
+
padding: 6px 24px 10px 24px;
|
|
5350
5353
|
}
|
|
5351
5354
|
.p-card .p-card-footer {
|
|
5352
|
-
padding:
|
|
5355
|
+
padding: 6px 24px;
|
|
5353
5356
|
border-top: 1px solid #eaecf0;
|
|
5354
5357
|
}
|
|
5355
5358
|
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InputNumber = exports.OverlayPanel = exports.Tag = exports.Carousel = exports.ToggleButton = exports.Slider = exports.Card = exports.Dialog = exports.Password = exports.confirmPopup = exports.ConfirmDialog = exports.RadioButton = exports.Badge = exports.Tooltip = exports.Calendar = exports.Image = exports.AvatarGroup = exports.Avatar = exports.classNames = exports.Paginator = exports.MultiSelect = exports.FileUpload = exports.TabMenu = exports.TabPanel = exports.TabView = exports.Sidebar = exports.Column = exports.DataTable = exports.Checkbox = exports.AutoComplete = exports.ColorPicker = exports.AccordionTab = exports.Accordion = exports.InputText = exports.Dropdown = exports.Button = void 0;
|
|
3
|
+
exports.Toast = exports.InputNumber = exports.OverlayPanel = exports.Tag = exports.Carousel = exports.ToggleButton = exports.Slider = exports.Card = exports.Dialog = exports.Password = exports.confirmPopup = exports.ConfirmDialog = exports.RadioButton = exports.Badge = exports.Tooltip = exports.Calendar = exports.Image = exports.AvatarGroup = exports.Avatar = exports.classNames = exports.Paginator = exports.MultiSelect = exports.FileUpload = exports.TabMenu = exports.TabPanel = exports.TabView = exports.Sidebar = exports.Column = exports.DataTable = exports.Checkbox = exports.AutoComplete = exports.ColorPicker = exports.AccordionTab = exports.Accordion = exports.InputText = exports.Dropdown = exports.Button = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const client_1 = tslib_1.__importDefault(require("react-dom/client"));
|
|
@@ -76,4 +76,6 @@ var overlay_panel_1 = require("./components/overlays/overlay-panel");
|
|
|
76
76
|
Object.defineProperty(exports, "OverlayPanel", { enumerable: true, get: function () { return tslib_1.__importDefault(overlay_panel_1).default; } });
|
|
77
77
|
var input_number_1 = require("./components/input/input-number");
|
|
78
78
|
Object.defineProperty(exports, "InputNumber", { enumerable: true, get: function () { return tslib_1.__importDefault(input_number_1).default; } });
|
|
79
|
+
var toast_1 = require("./components/toast/toast");
|
|
80
|
+
Object.defineProperty(exports, "Toast", { enumerable: true, get: function () { return tslib_1.__importDefault(toast_1).default; } });
|
|
79
81
|
client_1.default.createRoot(document.getElementById('root')).render((0, jsx_runtime_1.jsx)(App_1.default, {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const colorpicker_1 = require("primereact/colorpicker");
|
|
7
|
+
const button_1 = require("primereact/button");
|
|
8
|
+
const svg_component_1 = tslib_1.__importDefault(require("../../directives/svg-component"));
|
|
9
|
+
const ColorPickerComponent = () => {
|
|
10
|
+
const [color, setColor] = (0, react_1.useState)();
|
|
11
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "card flex justify-content-center", children: [(0, jsx_runtime_1.jsx)(colorpicker_1.ColorPicker, { value: color, onChange: (e) => setColor(e.value) }), (0, jsx_runtime_1.jsx)(button_1.Button, { className: "p-0 gap-1", link: true, icon: (0, jsx_runtime_1.jsx)(svg_component_1.default, { iconName: "user" }), label: "Add User" })] }));
|
|
12
|
+
};
|
|
13
|
+
exports.default = ColorPickerComponent;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const dropdown_1 = require("primereact/dropdown");
|
|
6
|
+
// import { Button } from 'primereact/button';
|
|
7
|
+
const svg_component_1 = tslib_1.__importDefault(require("../../directives/svg-component"));
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const DropdownComponent = () => {
|
|
10
|
+
const [selectedValue, setSelectedValue] = (0, react_1.useState)(null);
|
|
11
|
+
// Dropdown options
|
|
12
|
+
const members = [
|
|
13
|
+
{ name: "Phoenix Baker", at: "@phoenix" },
|
|
14
|
+
{ name: "Olivia Rhye", at: "@olivia" },
|
|
15
|
+
{ name: "Lana Steiner", at: "@lana" },
|
|
16
|
+
{ name: "Demi Wilkinson", at: "@demi" },
|
|
17
|
+
{ name: "Candice Wu", at: "@candice" },
|
|
18
|
+
{ name: "Natali Craig", at: "@natali" },
|
|
19
|
+
{ name: "Drew Cano", at: "@drew" },
|
|
20
|
+
];
|
|
21
|
+
const handleDropdownChange = (e) => {
|
|
22
|
+
setSelectedValue(e.value);
|
|
23
|
+
};
|
|
24
|
+
// const userIcon = <SvgIcon iconName="user" />
|
|
25
|
+
// Item Template to display the options in the dropdown pannel
|
|
26
|
+
const itemTemplate = (option, isIcon) => {
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex justify-content-between align-items-center", children: [(0, jsx_runtime_1.jsxs)("span", { className: "flex align-items-center gap-2", children: [isIcon && (0, jsx_runtime_1.jsx)(svg_component_1.default, { iconName: "user" }), (0, jsx_runtime_1.jsx)("span", { className: "font-medium text-gray-900 text-lg", children: option.name }), (0, jsx_runtime_1.jsx)("span", { className: "font-normal text-gray-600 text-lg", children: option.at })] }), selectedValue && selectedValue.name === option.name && ((0, jsx_runtime_1.jsx)("i", { className: "pi pi-check text-primary-600" }))] }));
|
|
28
|
+
};
|
|
29
|
+
// Value Template to display value in the dropdown after selecting an option from the dropdown.
|
|
30
|
+
const selectedOptionTemplate = (option, isIcon, props) => {
|
|
31
|
+
if (option) {
|
|
32
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "flex justify-content-between align-items-center", children: (0, jsx_runtime_1.jsxs)("span", { className: "flex align-items-center gap-2", children: [isIcon && (0, jsx_runtime_1.jsx)(svg_component_1.default, { iconName: "user" }), (0, jsx_runtime_1.jsx)("span", { className: "font-medium text-gray-900 text-lg", children: option.name }), (0, jsx_runtime_1.jsx)("span", { className: "font-normal text-gray-600 text-lg", children: option.at })] }) }));
|
|
33
|
+
}
|
|
34
|
+
return (0, jsx_runtime_1.jsx)("span", { children: props.placeholder });
|
|
35
|
+
};
|
|
36
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h2", { children: "Dropdown Component" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex align-items-center gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "card flex flex-column justify-content-between ml-2", children: [(0, jsx_runtime_1.jsx)("label", { className: "text-base font-medium text-gray-700 h-auto mb-1", children: "Team member" }), (0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { value: selectedValue, onChange: handleDropdownChange, options: members, optionLabel: "name", valueTemplate: (option, props) => selectedOptionTemplate(option, false, props), placeholder: "Select team member", className: "w-20rem", itemTemplate: (options) => itemTemplate(options, false) }), (0, jsx_runtime_1.jsx)("p", { className: "font-normal text-base h-1rem mt-2 text-gray-600", children: "This is a hint text to help user." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "card flex flex-column justify-content-between ml-2", children: [(0, jsx_runtime_1.jsx)("label", { className: "text-base font-medium text-gray-700 h-auto mb-1", children: "Team member" }), (0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { value: selectedValue, onChange: handleDropdownChange, options: members, optionLabel: "name", valueTemplate: (option, props) => selectedOptionTemplate(option, true, props), placeholder: "Select team member", className: "w-20rem", itemTemplate: (options) => itemTemplate(options, true) }), (0, jsx_runtime_1.jsx)("p", { className: "font-normal text-base h-1rem mt-2 text-gray-600", children: "This is a hint text to help user." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "card flex flex-column justify-content-between ml-2", children: [(0, jsx_runtime_1.jsx)("label", { className: "text-base font-medium text-gray-700 h-auto mb-1", children: "Team member" }), (0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { value: selectedValue, onChange: handleDropdownChange, options: members, optionLabel: "name", valueTemplate: (option, props) => selectedOptionTemplate(option, false, props), placeholder: "Select team member", className: "w-20rem p-invalid", itemTemplate: (options) => itemTemplate(options, false) }), (0, jsx_runtime_1.jsx)("p", { className: "font-normal text-base h-1rem mt-2 p-error", children: "This is an error message." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "card flex flex-column justify-content-between ml-2", children: [(0, jsx_runtime_1.jsx)("label", { className: "text-base font-medium text-gray-700 h-auto mb-1", children: "Team member" }), (0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { disabled: true, onChange: handleDropdownChange, options: members, optionLabel: "name", placeholder: "Select team member", className: "w-20rem", itemTemplate: (options) => itemTemplate(options, false) }), (0, jsx_runtime_1.jsx)("p", { className: "font-normal text-base h-1rem mt-2 text-gray-600", children: "This is a hint text to help user." })] })] })] }));
|
|
37
|
+
};
|
|
38
|
+
exports.default = DropdownComponent;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_router_dom_1 = require("react-router-dom");
|
|
6
|
+
const dropdown_component_1 = tslib_1.__importDefault(require("./dropdown/dropdown-component"));
|
|
7
|
+
const input_text_1 = tslib_1.__importDefault(require("./input/input-text"));
|
|
8
|
+
const color_picker_1 = tslib_1.__importDefault(require("./color-picker/color-picker"));
|
|
9
|
+
const Home = () => {
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)(react_router_dom_1.BrowserRouter, { children: (0, jsx_runtime_1.jsxs)(react_router_dom_1.Routes, { children: [(0, jsx_runtime_1.jsx)(react_router_dom_1.Route, { path: "/dropdown", element: (0, jsx_runtime_1.jsx)(dropdown_component_1.default, {}) }), (0, jsx_runtime_1.jsx)(react_router_dom_1.Route, { path: "/input", element: (0, jsx_runtime_1.jsx)(input_text_1.default, {}) }), (0, jsx_runtime_1.jsx)(react_router_dom_1.Route, { path: "/color-picker", element: (0, jsx_runtime_1.jsx)(color_picker_1.default, {}) })] }) }));
|
|
11
|
+
};
|
|
12
|
+
exports.default = Home;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const dropdown_1 = require("primereact/dropdown");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const InputComponent = () => {
|
|
7
|
+
const [selectedCity, setSelectedCity] = (0, react_1.useState)(null);
|
|
8
|
+
const cities = [
|
|
9
|
+
{ name: 'New York', code: 'NY' },
|
|
10
|
+
{ name: 'Rome', code: 'RM' },
|
|
11
|
+
{ name: 'London', code: 'LDN' },
|
|
12
|
+
{ name: 'Istanbul', code: 'IST' },
|
|
13
|
+
{ name: 'Paris', code: 'PRS' }
|
|
14
|
+
];
|
|
15
|
+
const optionTemplate = (option) => {
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "dropdown-option", children: [(0, jsx_runtime_1.jsx)("span", { children: option.name }), selectedCity && selectedCity.code === option.code && ((0, jsx_runtime_1.jsx)("i", { className: "pi pi-check selected-icon" }))] }));
|
|
17
|
+
};
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "card flex justify-content-center", children: (0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { value: selectedCity, onChange: (e) => setSelectedCity(e.value), options: cities, optionLabel: "name", placeholder: "Select a City", className: "w-full md:w-14rem", itemTemplate: optionTemplate }) }));
|
|
19
|
+
};
|
|
20
|
+
exports.default = InputComponent;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -36,4 +36,9 @@ export { default as Carousel } from './components/carousel/carousel';
|
|
|
36
36
|
export { default as Tag } from './components/carousel/tag';
|
|
37
37
|
export { default as OverlayPanel } from './components/overlays/overlay-panel';
|
|
38
38
|
export { default as InputNumber } from './components/input/input-number';
|
|
39
|
+
export { default as Toast } from './components/toast/toast';
|
|
39
40
|
export type { DropdownChangeEvent, CarouselResponsiveOption, ColorPickerChangeEvent, SliderChangeEvent };
|
|
41
|
+
export interface columnTypes {
|
|
42
|
+
field: string;
|
|
43
|
+
header: string;
|
|
44
|
+
}
|