@peassoft/mnr-web-ui-kit 2.3.0 → 2.4.0

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 type { JSX } from 'react';
2
+ export declare function UncheckedIcon(): JSX.Element;
3
+ export declare function CheckedIcon(): JSX.Element;
@@ -0,0 +1,39 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export function UncheckedIcon() {
3
+ return _jsx("svg", {
4
+ width: '24',
5
+ height: '24',
6
+ viewBox: '0 0 24 24',
7
+ fill: 'none',
8
+ stroke: 'currentColor',
9
+ strokeWidth: '1',
10
+ strokeLinecap: 'round',
11
+ strokeLinejoin: 'round',
12
+ className: 'uikit_PlainSelect_icon uikit_PlainSelect_uncheckedIcon',
13
+ children: _jsx("rect", {
14
+ width: '18',
15
+ height: '18',
16
+ x: '3',
17
+ y: '3',
18
+ rx: '2'
19
+ })
20
+ });
21
+ }
22
+ export function CheckedIcon() {
23
+ return _jsxs("svg", {
24
+ width: '24',
25
+ height: '24',
26
+ viewBox: '0 0 24 24',
27
+ fill: 'none',
28
+ stroke: 'currentColor',
29
+ strokeWidth: '2',
30
+ strokeLinecap: 'round',
31
+ strokeLinejoin: 'round',
32
+ className: 'uikit_PlainSelect_icon uikit_PlainSelect_checkedIcon',
33
+ children: [_jsx("path", {
34
+ d: 'M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344'
35
+ }), _jsx("path", {
36
+ d: 'm9 11 3 3L22 4'
37
+ })]
38
+ });
39
+ }
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useId, useCallback, useState, useMemo, useLayoutEffect, createRef } from 'react';
3
3
  import './styles.css';
4
- import Icon from './icon.js';
4
+ import { UncheckedIcon, CheckedIcon } from './icons.js';
5
5
  /**
6
6
  * Select element implementing Listbox pattern. Presents a list of options and allows
7
7
  * a user to select one or more of them.
@@ -177,9 +177,7 @@ export function PlainSelect(props) {
177
177
  tabIndex: multiple && currFocusedIdx === idx ? 0 : -1,
178
178
  onClick: () => handleItemClick(item.id),
179
179
  onKeyDown: multiple ? handleMultiSelectKeyDown : undefined,
180
- children: [_jsx(Icon, {
181
- selected: isSelected
182
- }), _jsxs("div", {
180
+ children: [isSelected ? _jsx(CheckedIcon, {}) : _jsx(UncheckedIcon, {}), _jsxs("div", {
183
181
  className: 'uikit_PlainSelect_itemContent',
184
182
  children: [_jsx("div", {
185
183
  children: item.title
@@ -1,11 +1,11 @@
1
1
  .uikit_PlainSelect_label {
2
2
  margin: 0;
3
- color: #757575;
3
+ color: #737373;
4
4
  }
5
5
 
6
6
  @media (prefers-color-scheme: dark) {
7
7
  .uikit_PlainSelect_label {
8
- color: #979797;
8
+ color: #acacac;
9
9
  }
10
10
  }
11
11
 
@@ -37,8 +37,12 @@
37
37
  flex-shrink: 0;
38
38
  }
39
39
 
40
- .uikit_PlainSelect_icon--hidden {
41
- visibility: hidden;
40
+ .uikit_PlainSelect_uncheckedIcon {
41
+ color: #767676;
42
+ }
43
+
44
+ .uikit_PlainSelect_checkedIcon {
45
+ color: #337e33;
42
46
  }
43
47
 
44
48
  .uikit_PlainSelect_itemContent {
@@ -51,6 +55,6 @@
51
55
 
52
56
  .uikit_PlainSelect_description {
53
57
  margin-top: 0.5em;
54
- color: #757575;
58
+ color: #737373;
55
59
  font-size: 87.5%;
56
60
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peassoft/mnr-web-ui-kit",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "Peassoft web UI kit for MNR web applications",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,6 +0,0 @@
1
- import type { JSX } from 'react';
2
- type Props = {
3
- selected: boolean;
4
- };
5
- export default function Icon(props: Props): JSX.Element;
6
- export {};
@@ -1,17 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- export default function Icon(props) {
3
- const {
4
- selected
5
- } = props;
6
- const className = 'uikit_PlainSelect_icon' + (selected ? '' : ' uikit_PlainSelect_icon--hidden');
7
- return _jsx("svg", {
8
- className: className,
9
- width: '24',
10
- height: '24',
11
- viewBox: '0 0 24 24',
12
- children: _jsx("path", {
13
- d: 'M9 16.172l10.594-10.594 1.406 1.406-12 12-5.578-5.578 1.406-1.406z',
14
- fill: '#24b23e'
15
- })
16
- });
17
- }