@paygreen/pgui 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.
package/dist/cjs/index.js CHANGED
@@ -43933,7 +43933,7 @@ var inputStyle = function inputStyle(isHidden) {
43933
43933
  }, spacingStyle);
43934
43934
  };
43935
43935
 
43936
- var Input = function Input(props) {
43936
+ var Input$1 = function Input(props) {
43937
43937
  var className = props.className,
43938
43938
  cx = props.cx,
43939
43939
  getStyles = props.getStyles,
@@ -44195,7 +44195,7 @@ var components$1 = {
44195
44195
  GroupHeading: GroupHeading,
44196
44196
  IndicatorsContainer: IndicatorsContainer,
44197
44197
  IndicatorSeparator: IndicatorSeparator,
44198
- Input: Input,
44198
+ Input: Input$1,
44199
44199
  LoadingIndicator: LoadingIndicator,
44200
44200
  Menu: Menu,
44201
44201
  MenuList: MenuList,
@@ -45289,7 +45289,7 @@ var defaultTheme = {
45289
45289
  spacing: spacing
45290
45290
  };
45291
45291
 
45292
- var defaultProps = {
45292
+ var defaultProps$5 = {
45293
45293
  'aria-live': 'polite',
45294
45294
  backspaceRemovesValue: true,
45295
45295
  blurInputOnSelect: isTouchCapable(),
@@ -47073,7 +47073,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
47073
47073
  return Select;
47074
47074
  }(React.Component);
47075
47075
 
47076
- Select$1.defaultProps = defaultProps;
47076
+ Select$1.defaultProps = defaultProps$5;
47077
47077
 
47078
47078
  var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
47079
47079
  var baseSelectProps = useStateManager(props);
@@ -51085,6 +51085,19 @@ var button = {
51085
51085
  }
51086
51086
  };
51087
51087
 
51088
+ var defaultProps$4 = {
51089
+ colorScheme: 'brand'
51090
+ };
51091
+ var baseStyle$1 = {
51092
+ control: {
51093
+ borderRadius: '4px'
51094
+ }
51095
+ };
51096
+ var checkbox = {
51097
+ defaultProps: defaultProps$4,
51098
+ baseStyle: baseStyle$1
51099
+ };
51100
+
51088
51101
  var getSize = function (value) {
51089
51102
  if (value === 'full') {
51090
51103
  return {
@@ -51102,10 +51115,64 @@ var drawer = {
51102
51115
  sizes: sizes$1
51103
51116
  };
51104
51117
 
51105
- var input = {
51118
+ var Input = {
51119
+ baseStyle: {
51120
+ field: {
51121
+ borderRadius: 'full'
51122
+ }
51123
+ },
51124
+ variants: {
51125
+ outline: function (props) {
51126
+ return {
51127
+ field: {
51128
+ bg: 'white',
51129
+ borderColor: 'gray.200',
51130
+ _focus: {
51131
+ borderColor: 'brand.500'
51132
+ },
51133
+ _focusVisible: {
51134
+ boxShadow: "0 0 0 1px ".concat(props.theme.colors.brand[500])
51135
+ }
51136
+ },
51137
+ addon: {
51138
+ borderRadius: 'full'
51139
+ }
51140
+ };
51141
+ },
51142
+ filled: function (props) { return ({
51143
+ field: {
51144
+ bg: 'gray.50',
51145
+ borderWidth: '1px',
51146
+ borderColor: 'gray.200',
51147
+ _hover: {
51148
+ bg: 'gray.50',
51149
+ borderColor: 'gray.200'
51150
+ },
51151
+ _focus: {
51152
+ bg: 'gray.50',
51153
+ borderColor: 'brand.500'
51154
+ },
51155
+ _focusVisible: {
51156
+ boxShadow: "0 0 0 1px ".concat(props.theme.colors.brand[500])
51157
+ }
51158
+ },
51159
+ addon: {
51160
+ borderRadius: 'full'
51161
+ }
51162
+ }); }
51163
+ }
51164
+ };
51165
+
51166
+ var numberInput = {
51106
51167
  baseStyle: {
51107
51168
  field: {
51108
51169
  borderRadius: 'full'
51170
+ },
51171
+ stepperGroup: {
51172
+ width: '2rem'
51173
+ },
51174
+ stepper: {
51175
+ paddingRight: '0.2rem'
51109
51176
  }
51110
51177
  },
51111
51178
  variants: {
@@ -51152,6 +51219,35 @@ var input = {
51152
51219
  }
51153
51220
  };
51154
51221
 
51222
+ var variants$1 = {
51223
+ outline: function (props) { var _a; return (_a = Input.variants.outline(props).field) !== null && _a !== void 0 ? _a : {}; },
51224
+ filled: function (props) { var _a; return (_a = Input.variants.filled(props).field) !== null && _a !== void 0 ? _a : {}; }
51225
+ };
51226
+ var pinInput = {
51227
+ variants: variants$1
51228
+ };
51229
+
51230
+ var defaultProps$3 = {
51231
+ colorScheme: 'brand'
51232
+ };
51233
+ var radio = {
51234
+ defaultProps: defaultProps$3
51235
+ };
51236
+
51237
+ var defaultProps$2 = {
51238
+ colorScheme: 'brand'
51239
+ };
51240
+ var slider = {
51241
+ defaultProps: defaultProps$2
51242
+ };
51243
+
51244
+ var defaultProps$1 = {
51245
+ colorScheme: 'brand'
51246
+ };
51247
+ var _switch = {
51248
+ defaultProps: defaultProps$1
51249
+ };
51250
+
51155
51251
  var tag = {
51156
51252
  baseStyle: {
51157
51253
  container: {
@@ -51161,13 +51257,35 @@ var tag = {
51161
51257
  }
51162
51258
  };
51163
51259
 
51260
+ var baseStyle = __assign$2(__assign$2({}, Input.baseStyle.field), { paddingY: '8px', minHeight: '80px', lineHeight: 'short', verticalAlign: 'top' });
51261
+ var variants = {
51262
+ outline: function (props) { var _a; return (_a = Input.variants.outline(props).field) !== null && _a !== void 0 ? _a : {}; },
51263
+ filled: function (props) { var _a; return (_a = Input.variants.filled(props).field) !== null && _a !== void 0 ? _a : {}; }
51264
+ };
51265
+ var defaultProps = {
51266
+ size: 'md',
51267
+ variant: 'outline'
51268
+ };
51269
+ var textarea = {
51270
+ baseStyle: baseStyle,
51271
+ variants: variants,
51272
+ defaultProps: defaultProps
51273
+ };
51274
+
51164
51275
  var components = /*#__PURE__*/Object.freeze({
51165
51276
  __proto__: null,
51166
51277
  Badge: badge,
51167
51278
  Button: button,
51279
+ Checkbox: checkbox,
51168
51280
  Drawer: drawer,
51169
- Input: input,
51170
- Tag: tag
51281
+ Input: Input,
51282
+ NumberInput: numberInput,
51283
+ PinInput: pinInput,
51284
+ Radio: radio,
51285
+ Slider: slider,
51286
+ Switch: _switch,
51287
+ Tag: tag,
51288
+ Textarea: textarea
51171
51289
  });
51172
51290
 
51173
51291
  var colors = {