@paygreen/pgui 3.1.0 → 3.1.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/dist/pgui.css CHANGED
@@ -1 +1 @@
1
- :root{--PhoneInput-color--focus: #03b2cb;--PhoneInputInternationalIconPhone-opacity: .8;--PhoneInputInternationalIconGlobe-opacity: .65;--PhoneInputCountrySelect-marginRight: .35em;--PhoneInputCountrySelectArrow-width: .3em;--PhoneInputCountrySelectArrow-marginLeft: var(--PhoneInputCountrySelect-marginRight);--PhoneInputCountrySelectArrow-borderWidth: 1px;--PhoneInputCountrySelectArrow-opacity: .45;--PhoneInputCountrySelectArrow-color: currentColor;--PhoneInputCountrySelectArrow-color--focus: var(--PhoneInput-color--focus);--PhoneInputCountrySelectArrow-transform: rotate(45deg);--PhoneInputCountryFlag-aspectRatio: 1.5;--PhoneInputCountryFlag-height: 1em;--PhoneInputCountryFlag-borderWidth: 1px;--PhoneInputCountryFlag-borderColor: rgba(0,0,0,.5);--PhoneInputCountryFlag-borderColor--focus: var(--PhoneInput-color--focus);--PhoneInputCountryFlag-backgroundColor--loading: rgba(0,0,0,.1)}.PhoneInput{display:flex;align-items:center}.PhoneInputInput{flex:1;min-width:0}.PhoneInputCountryIcon{width:calc(var(--PhoneInputCountryFlag-height) * var(--PhoneInputCountryFlag-aspectRatio));height:var(--PhoneInputCountryFlag-height)}.PhoneInputCountryIcon--square{width:var(--PhoneInputCountryFlag-height)}.PhoneInputCountryIcon--border{background-color:var(--PhoneInputCountryFlag-backgroundColor--loading);box-shadow:0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor),inset 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor)}.PhoneInputCountryIconImg{display:block;width:100%;height:100%}.PhoneInputInternationalIconPhone{opacity:var(--PhoneInputInternationalIconPhone-opacity)}.PhoneInputInternationalIconGlobe{opacity:var(--PhoneInputInternationalIconGlobe-opacity)}.PhoneInputCountry{position:relative;align-self:stretch;display:flex;align-items:center;margin-right:var(--PhoneInputCountrySelect-marginRight)}.PhoneInputCountrySelect{position:absolute;top:0;left:0;height:100%;width:100%;z-index:1;border:0;opacity:0;cursor:pointer}.PhoneInputCountrySelect[disabled],.PhoneInputCountrySelect[readonly]{cursor:default}.PhoneInputCountrySelectArrow{display:block;content:"";width:var(--PhoneInputCountrySelectArrow-width);height:var(--PhoneInputCountrySelectArrow-width);margin-left:var(--PhoneInputCountrySelectArrow-marginLeft);border-style:solid;border-color:var(--PhoneInputCountrySelectArrow-color);border-top-width:0;border-bottom-width:var(--PhoneInputCountrySelectArrow-borderWidth);border-left-width:0;border-right-width:var(--PhoneInputCountrySelectArrow-borderWidth);transform:var(--PhoneInputCountrySelectArrow-transform);opacity:var(--PhoneInputCountrySelectArrow-opacity)}.PhoneInputCountrySelect:focus+.PhoneInputCountryIcon+.PhoneInputCountrySelectArrow{opacity:1;color:var(--PhoneInputCountrySelectArrow-color--focus)}.PhoneInputCountrySelect:focus+.PhoneInputCountryIcon--border{box-shadow:0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor--focus),inset 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor--focus)}.PhoneInputCountrySelect:focus+.PhoneInputCountryIcon .PhoneInputInternationalIconGlobe{opacity:1;color:var(--PhoneInputCountrySelectArrow-color--focus)}.select-custom-container{font-size:var(--chakra-font-sizes-sm);min-width:200px;display:inline-block;width:100%}.select-custom-container--error .select-custom__control{border-color:var(--chakra-colors-border-error)!important}.select-custom-container--error .select-custom__control--is-focused{border-color:var(--chakra-colors-border-error)!important;box-shadow:0 0 0 1px var(--chakra-colors-border-error)!important}.select-custom-container--error .select-custom__control:hover{border-color:var(--chakra-colors-border-error)!important}.select-custom__single-value{color:var(--chakra-colors-fg)!important}.select-custom__control{border:1px solid var(--chakra-colors-border)!important}.select-custom__control,.select-custom__control--is-focused{min-height:var(--chakra-sizes-9)!important;background-color:transparent!important}.select-custom__control--is-focused{box-shadow:none!important;outline-offset:0!important;outline-width:var(--focus-ring-width, 1px)!important;outline-color:var(--chakra-colors-color-palette-focus-ring)!important;outline-style:var(--focus-ring-style, solid)!important;border-color:var(--chakra-colors-color-palette-focus-ring)!important}@keyframes pgui-select-menu-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.select-custom__menu{z-index:1000!important;border:1px solid var(--chakra-colors-border)!important;background-color:var(--chakra-colors-bg-panel)!important;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f!important;border-radius:var(--chakra-radii-md)!important;animation:pgui-select-menu-in .2s cubic-bezier(.4,0,.2,1)}.select-custom__menu-list{border-radius:var(--chakra-radii-md)!important;padding:0!important}.select-custom__multi-value{background-color:var(--chakra-colors-bg-panel)!important;border:1px solid var(--chakra-colors-border)!important;border-radius:var(--chakra-radii-sm)!important}.select-custom__multi-value__label{color:var(--chakra-colors-fg)!important}.select-custom__option{background-color:var(--chakra-colors-bg)!important;font-size:var(--chakra-font-sizes-sm)!important;padding:5px 10px!important}.select-custom__option:hover{background-color:var(--chakra-colors-bg-muted)!important;cursor:pointer!important}.select-custom__option--is-selected{color:var(--chakra-colors-fg)!important;background-color:var(--chakra-colors-bg-muted)!important}.select-custom__multi-value__label{font-size:var(--chakra-font-sizes-sm)!important}.select-custom__multi-value__remove{color:var(--chakra-colors-fg)!important}.select-custom__multi-value__remove:hover{cursor:pointer!important;background-color:var(--chakra-colors-danger-muted)!important}.select-custom__indicator svg{cursor:pointer;width:15px;height:15px}
1
+ :root{--PhoneInput-color--focus: #03b2cb;--PhoneInputInternationalIconPhone-opacity: .8;--PhoneInputInternationalIconGlobe-opacity: .65;--PhoneInputCountrySelect-marginRight: .35em;--PhoneInputCountrySelectArrow-width: .3em;--PhoneInputCountrySelectArrow-marginLeft: var(--PhoneInputCountrySelect-marginRight);--PhoneInputCountrySelectArrow-borderWidth: 1px;--PhoneInputCountrySelectArrow-opacity: .45;--PhoneInputCountrySelectArrow-color: currentColor;--PhoneInputCountrySelectArrow-color--focus: var(--PhoneInput-color--focus);--PhoneInputCountrySelectArrow-transform: rotate(45deg);--PhoneInputCountryFlag-aspectRatio: 1.5;--PhoneInputCountryFlag-height: 1em;--PhoneInputCountryFlag-borderWidth: 1px;--PhoneInputCountryFlag-borderColor: rgba(0,0,0,.5);--PhoneInputCountryFlag-borderColor--focus: var(--PhoneInput-color--focus);--PhoneInputCountryFlag-backgroundColor--loading: rgba(0,0,0,.1)}.PhoneInput{display:flex;align-items:center}.PhoneInputInput{flex:1;min-width:0}.PhoneInputCountryIcon{width:calc(var(--PhoneInputCountryFlag-height) * var(--PhoneInputCountryFlag-aspectRatio));height:var(--PhoneInputCountryFlag-height)}.PhoneInputCountryIcon--square{width:var(--PhoneInputCountryFlag-height)}.PhoneInputCountryIcon--border{background-color:var(--PhoneInputCountryFlag-backgroundColor--loading);box-shadow:0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor),inset 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor)}.PhoneInputCountryIconImg{display:block;width:100%;height:100%}.PhoneInputInternationalIconPhone{opacity:var(--PhoneInputInternationalIconPhone-opacity)}.PhoneInputInternationalIconGlobe{opacity:var(--PhoneInputInternationalIconGlobe-opacity)}.PhoneInputCountry{position:relative;align-self:stretch;display:flex;align-items:center;margin-right:var(--PhoneInputCountrySelect-marginRight)}.PhoneInputCountrySelect{position:absolute;top:0;left:0;height:100%;width:100%;z-index:1;border:0;opacity:0;cursor:pointer}.PhoneInputCountrySelect[disabled],.PhoneInputCountrySelect[readonly]{cursor:default}.PhoneInputCountrySelectArrow{display:block;content:"";width:var(--PhoneInputCountrySelectArrow-width);height:var(--PhoneInputCountrySelectArrow-width);margin-left:var(--PhoneInputCountrySelectArrow-marginLeft);border-style:solid;border-color:var(--PhoneInputCountrySelectArrow-color);border-top-width:0;border-bottom-width:var(--PhoneInputCountrySelectArrow-borderWidth);border-left-width:0;border-right-width:var(--PhoneInputCountrySelectArrow-borderWidth);transform:var(--PhoneInputCountrySelectArrow-transform);opacity:var(--PhoneInputCountrySelectArrow-opacity)}.PhoneInputCountrySelect:focus+.PhoneInputCountryIcon+.PhoneInputCountrySelectArrow{opacity:1;color:var(--PhoneInputCountrySelectArrow-color--focus)}.PhoneInputCountrySelect:focus+.PhoneInputCountryIcon--border{box-shadow:0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor--focus),inset 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor--focus)}.PhoneInputCountrySelect:focus+.PhoneInputCountryIcon .PhoneInputInternationalIconGlobe{opacity:1;color:var(--PhoneInputCountrySelectArrow-color--focus)}.select-custom-container{font-size:var(--chakra-font-sizes-sm);min-width:200px;display:inline-block;width:100%}.select-custom-container--error .select-custom__control{border-color:var(--chakra-colors-border-error)!important}.select-custom-container--error .select-custom__control--is-focused{border-color:var(--chakra-colors-border-error)!important;box-shadow:0 0 0 1px var(--chakra-colors-border-error)!important}.select-custom-container--error .select-custom__control:hover{border-color:var(--chakra-colors-border-error)!important}.select-custom__placeholder{color:var(--chakra-colors-fg-muted)!important}.select-custom__control--is-disabled{opacity:.5!important;cursor:not-allowed!important}.select-custom__control--is-disabled .select-custom__placeholder{color:var(--chakra-colors-fg-muted)!important}.select-custom__single-value{color:var(--chakra-colors-fg)!important}.select-custom__control{border:1px solid var(--chakra-colors-border)!important}.select-custom__control,.select-custom__control--is-focused{min-height:var(--chakra-sizes-9)!important;background-color:transparent!important}.select-custom__control--is-focused{box-shadow:none!important;outline-offset:0!important;outline-width:var(--focus-ring-width, 1px)!important;outline-color:var(--chakra-colors-color-palette-focus-ring)!important;outline-style:var(--focus-ring-style, solid)!important;border-color:var(--chakra-colors-color-palette-focus-ring)!important}@keyframes pgui-select-menu-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.select-custom__menu{z-index:1000!important;border:1px solid var(--chakra-colors-border)!important;background-color:var(--chakra-colors-bg-panel)!important;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f!important;border-radius:var(--chakra-radii-md)!important;animation:pgui-select-menu-in .2s cubic-bezier(.4,0,.2,1)}.select-custom__menu-list{border-radius:var(--chakra-radii-md)!important;padding:0!important}.select-custom__multi-value{background-color:var(--chakra-colors-bg-panel)!important;border:1px solid var(--chakra-colors-border)!important;border-radius:var(--chakra-radii-sm)!important}.select-custom__multi-value__label{color:var(--chakra-colors-fg)!important}.select-custom__option{background-color:var(--chakra-colors-bg)!important;font-size:var(--chakra-font-sizes-sm)!important;padding:5px 10px!important}.select-custom__option:hover{background-color:var(--chakra-colors-bg-muted)!important;cursor:pointer!important}.select-custom__option--is-selected{color:var(--chakra-colors-fg)!important;background-color:var(--chakra-colors-bg-muted)!important}.select-custom__multi-value__label{font-size:var(--chakra-font-sizes-sm)!important}.select-custom__multi-value__remove{color:var(--chakra-colors-fg)!important}.select-custom__multi-value__remove:hover{cursor:pointer!important;background-color:var(--chakra-colors-danger-muted)!important}.select-custom__indicator svg{cursor:pointer;width:15px;height:15px}
@@ -26,5 +26,57 @@ declare const alertRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"cont
26
26
  };
27
27
  };
28
28
  };
29
+ variant: {
30
+ subtle: {
31
+ root: {
32
+ bg: "colorPalette.subtle";
33
+ color: "fg";
34
+ borderTopColor: "border.subtle";
35
+ borderRightColor: "border.subtle";
36
+ borderBottomColor: "border.subtle";
37
+ shadow: "none";
38
+ boxShadow: "none";
39
+ };
40
+ };
41
+ surface: {
42
+ root: {
43
+ bg: "colorPalette.subtle";
44
+ color: "fg";
45
+ shadow: "none";
46
+ boxShadow: "card";
47
+ };
48
+ };
49
+ outline: {
50
+ root: {
51
+ bg: "bg";
52
+ color: "fg";
53
+ shadow: "none";
54
+ boxShadow: "none";
55
+ };
56
+ };
57
+ solid: {
58
+ root: {
59
+ bg: "colorPalette.solid";
60
+ color: "colorPalette.contrast";
61
+ borderTopWidth: "1px";
62
+ borderRightWidth: "1px";
63
+ borderBottomWidth: "1px";
64
+ borderLeftWidth: "1px";
65
+ borderTopColor: "colorPalette.emphasized";
66
+ borderRightColor: "colorPalette.emphasized";
67
+ borderBottomColor: "colorPalette.emphasized";
68
+ borderLeftColor: "colorPalette.emphasized";
69
+ };
70
+ title: {
71
+ color: "colorPalette.contrast";
72
+ };
73
+ description: {
74
+ color: "colorPalette.contrast";
75
+ };
76
+ indicator: {
77
+ color: "colorPalette.contrast";
78
+ };
79
+ };
80
+ };
29
81
  }>;
30
82
  export default alertRecipe;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * NativeSelect overrides — align empty-state text with Chakra Input placeholders.
3
+ * Native <select> has no ::placeholder; the empty option is styled via :has().
4
+ */
5
+ declare const nativeSelectRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"field" | "root" | "indicator", import('@chakra-ui/react').SlotRecipeVariantRecord<"field" | "root" | "indicator">>;
6
+ export default nativeSelectRecipe;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paygreen/pgui",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "core ui for paygreen apps",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -36,14 +36,14 @@
36
36
  "author": "",
37
37
  "license": "ISC",
38
38
  "dependencies": {
39
- "@chakra-ui/react": "^3.35.0",
39
+ "@chakra-ui/react": "^3.36.0",
40
40
  "@emotion/react": "^11.14.0",
41
41
  "@emotion/styled": "^11.14.1",
42
42
  "@fontsource-variable/geist": "^5.2.9",
43
- "@internationalized/date": "^3.12.1",
43
+ "@internationalized/date": "^3.12.2",
44
44
  "@tanstack/react-table": "^8.21.3",
45
- "dayjs": "^1.11.20",
46
- "libphonenumber-js": "^1.12.39",
45
+ "dayjs": "^1.11.21",
46
+ "libphonenumber-js": "1.12.39",
47
47
  "next-themes": "^0.4.6",
48
48
  "react": "^18.0.0 || ^19.0.0",
49
49
  "react-dom": "^18.0.0 || ^19.0.0",
@@ -54,24 +54,25 @@
54
54
  "use-mask-input": "^3.7.4"
55
55
  },
56
56
  "devDependencies": {
57
- "@storybook/addon-a11y": "^9.1.17",
58
- "@storybook/addon-docs": "^9.1.17",
59
- "@storybook/addon-links": "^9.1.17",
60
- "@storybook/addon-themes": "^9.1.17",
61
- "@storybook/addon-vitest": "^9.1.17",
62
- "@storybook/builder-vite": "^9.1.17",
63
- "@storybook/react-vite": "^9.1.17",
57
+ "@storybook/addon-a11y": "^10.4.6",
58
+ "@storybook/addon-docs": "^10.4.6",
59
+ "@storybook/addon-links": "^10.4.6",
60
+ "@storybook/addon-themes": "^10.4.6",
61
+ "@storybook/addon-vitest": "^10.4.6",
62
+ "@storybook/builder-vite": "^10.4.6",
63
+ "@storybook/react-vite": "^10.4.6",
64
64
  "@testing-library/react": "^16.3.2",
65
65
  "@trivago/prettier-plugin-sort-imports": "^5.2.2",
66
- "@types/node": "^24.12.4",
67
- "@types/react": "^19.2.15",
66
+ "@types/node": "^24.13.2",
67
+ "@types/react": "^19.2.17",
68
68
  "@types/react-dom": "^19.2.3",
69
69
  "@typescript-eslint/eslint-plugin": "^7.0.0",
70
70
  "@typescript-eslint/parser": "^7.0.0",
71
71
  "@vitejs/plugin-react": "^4.5.2",
72
- "@vitest/browser": "^3.2.3",
73
- "@vitest/coverage-istanbul": "^3.2.4",
74
- "@vitest/coverage-v8": "^3.2.3",
72
+ "@vitest/browser": "^4.1.9",
73
+ "@vitest/browser-playwright": "^4.1.9",
74
+ "@vitest/coverage-istanbul": "^4.1.9",
75
+ "@vitest/coverage-v8": "^4.1.9",
75
76
  "eslint": "^8.2.0",
76
77
  "eslint-config-airbnb": "^19.0.4",
77
78
  "eslint-config-airbnb-typescript": "^18.0.0",
@@ -79,22 +80,22 @@
79
80
  "eslint-plugin-import": "^2.32.0",
80
81
  "eslint-plugin-jsx-a11y": "^6.10.2",
81
82
  "eslint-plugin-react": "^7.37.5",
82
- "eslint-plugin-storybook": "^0.11.2",
83
+ "eslint-plugin-storybook": "^10.4.6",
83
84
  "globals": "^16.2.0",
84
85
  "husky": "^9.1.7",
85
86
  "jsdom": "^29.1.1",
86
87
  "lint-staged": "^16.3.2",
87
- "playwright": "^1.60.0",
88
- "prettier": "^3.8.3",
88
+ "playwright": "^1.61.0",
89
+ "prettier": "^3.8.4",
89
90
  "prop-types": "^15.8.1",
90
- "storybook": "^9.1.17",
91
+ "storybook": "^10.4.6",
91
92
  "typescript": "^5.9.3",
92
93
  "vite-plugin-dts": "^4.5.4",
93
94
  "vite-tsconfig-paths": "^5.1.4",
94
- "vitest": "^3.2.3"
95
+ "vitest": "^4.1.9"
95
96
  },
96
97
  "peerDependencies": {
97
- "@chakra-ui/react": "^3.35.0",
98
+ "@chakra-ui/react": "^3.36.0",
98
99
  "@emotion/react": "^11.14.0",
99
100
  "@emotion/styled": "^11.14.1",
100
101
  "@tanstack/react-table": "^8.21.3",
@@ -108,5 +109,8 @@
108
109
  "@chakra-ui/react": {
109
110
  "optional": false
110
111
  }
112
+ },
113
+ "overrides": {
114
+ "esbuild": "0.28.1"
111
115
  }
112
116
  }
@@ -18,6 +18,19 @@
18
18
  border-color: var(--chakra-colors-border-error) !important;
19
19
  }
20
20
 
21
+ .select-custom__placeholder {
22
+ color: var(--chakra-colors-fg-muted) !important;
23
+ }
24
+
25
+ .select-custom__control--is-disabled {
26
+ opacity: 0.5 !important;
27
+ cursor: not-allowed !important;
28
+ }
29
+
30
+ .select-custom__control--is-disabled .select-custom__placeholder {
31
+ color: var(--chakra-colors-fg-muted) !important;
32
+ }
33
+
21
34
  .select-custom__single-value {
22
35
  color: var(--chakra-colors-fg) !important;
23
36
  }