@ainias42/react-bootstrap-mobile 0.2.9 → 0.2.10

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.
Files changed (24) hide show
  1. package/dist/bootstrapReactMobile.js +64 -45
  2. package/dist/bootstrapReactMobile.js.map +1 -1
  3. package/dist/src/Components/Dialog/DialogBackground.d.ts +2 -1
  4. package/dist/src/Components/FormElements/ColorInput/ColorInput.d.ts +2 -1
  5. package/dist/src/Components/FormElements/Controller/ColorInputController.d.ts +1 -1
  6. package/dist/src/Components/FormElements/Controller/InputController.d.ts +1 -1
  7. package/dist/src/Components/FormElements/Controller/MultipleFileInputController.d.ts +1 -1
  8. package/dist/src/Components/FormElements/Controller/PasswordInputController.d.ts +1 -1
  9. package/dist/src/Components/FormElements/Controller/SelectController.d.ts +1 -1
  10. package/dist/src/Components/FormElements/Controller/SwitchController.d.ts +1 -1
  11. package/dist/src/Components/FormElements/Controller/TextareaController.d.ts +1 -1
  12. package/dist/src/Components/FormElements/Controller/withHookController.d.ts +1 -1
  13. package/dist/src/Components/FormElements/Select/Select.d.ts +12 -6
  14. package/dist/src/Components/Layout/Block.d.ts +1 -1
  15. package/dist/src/Components/Layout/Flex.d.ts +1 -1
  16. package/dist/src/Components/Layout/Inline.d.ts +1 -1
  17. package/dist/src/Components/Layout/InlineBlock.d.ts +1 -1
  18. package/dist/src/Components/Layout/View.d.ts +1 -1
  19. package/dist/src/Components/Layout/ViewWithoutListeners.d.ts +1 -1
  20. package/package.json +1 -1
  21. package/src/Components/Dialog/DialogBackground.tsx +19 -7
  22. package/src/Components/FormElements/ColorInput/ColorInput.tsx +4 -1
  23. package/src/Components/FormElements/ColorInput/colorInput.scss +0 -2
  24. package/src/Components/FormElements/Select/Select.tsx +17 -6
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @ainias42/react-bootstrap-mobile v0.2.8
3
+ * @ainias42/react-bootstrap-mobile v0.2.9
4
4
  * git+https://github.com/Ainias/Bootstrap-React-Mobile.git
5
5
  * Copyright (c) Silas Günther and project contributors.
6
6
  * This source code is licensed under the MIT license found in the
@@ -1373,7 +1373,7 @@ var ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = __webpack_require__(1354);
1373
1373
  var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(6314);
1374
1374
  var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);
1375
1375
  // Module
1376
- ___CSS_LOADER_EXPORT___.push([module.id, `.colorInput__7LDDj{margin-left:.5rem;margin-right:.5rem;display:flex}.colorInput__7LDDj .preview__U27kg{margin-left:.4rem;width:1rem;height:1rem;display:inline-block;border:1px solid #000}.colorInput__7LDDj .modalContainer__DJAC0{z-index:9999;position:fixed;top:0;left:0;right:0;bottom:0;width:100vw;height:100vh;overflow:auto}.colorInput__7LDDj .modalContainer__DJAC0 .modal__HgPzb{position:absolute;background-color:#fff}.colorInput__7LDDj .label__kakvy{flex:1;margin-right:.2rem}`, "",{"version":3,"sources":["webpack://./src/Components/FormElements/ColorInput/colorInput.scss"],"names":[],"mappings":"AAAA,mBACE,iBAAA,CACA,kBAAA,CACA,YAAA,CAEA,mCACE,iBAAA,CACA,UAAA,CACA,WAAA,CACA,oBAAA,CACA,qBAAA,CAGF,0CACE,YAAA,CACA,cAAA,CACA,KAAA,CACA,MAAA,CACA,OAAA,CACA,QAAA,CACA,WAAA,CACA,YAAA,CACA,aAAA,CAEA,wDACE,iBAAA,CACA,qBAAA,CAIJ,iCACE,MAAA,CACA,kBAAA","sourcesContent":[".colorInput {\n margin-left: 0.5rem;\n margin-right: 0.5rem;\n display: flex;\n\n .preview {\n margin-left: 0.4rem;\n width: 1rem;\n height: 1rem;\n display: inline-block;\n border: 1px solid black;\n }\n\n .modalContainer {\n z-index: 9999;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n width: 100vw;\n height: 100vh;\n overflow: auto;\n\n .modal {\n position: absolute;\n background-color: white;\n }\n }\n\n .label {\n flex: 1;\n margin-right: 0.2rem;\n }\n}\n"],"sourceRoot":""}]);
1376
+ ___CSS_LOADER_EXPORT___.push([module.id, `.colorInput__7LDDj{display:flex}.colorInput__7LDDj .preview__U27kg{margin-left:.4rem;width:1rem;height:1rem;display:inline-block;border:1px solid #000}.colorInput__7LDDj .modalContainer__DJAC0{z-index:9999;position:fixed;top:0;left:0;right:0;bottom:0;width:100vw;height:100vh;overflow:auto}.colorInput__7LDDj .modalContainer__DJAC0 .modal__HgPzb{position:absolute;background-color:#fff}.colorInput__7LDDj .label__kakvy{flex:1;margin-right:.2rem}`, "",{"version":3,"sources":["webpack://./src/Components/FormElements/ColorInput/colorInput.scss"],"names":[],"mappings":"AAAA,mBACE,YAAA,CAEA,mCACE,iBAAA,CACA,UAAA,CACA,WAAA,CACA,oBAAA,CACA,qBAAA,CAGF,0CACE,YAAA,CACA,cAAA,CACA,KAAA,CACA,MAAA,CACA,OAAA,CACA,QAAA,CACA,WAAA,CACA,YAAA,CACA,aAAA,CAEA,wDACE,iBAAA,CACA,qBAAA,CAIJ,iCACE,MAAA,CACA,kBAAA","sourcesContent":[".colorInput {\n display: flex;\n\n .preview {\n margin-left: 0.4rem;\n width: 1rem;\n height: 1rem;\n display: inline-block;\n border: 1px solid black;\n }\n\n .modalContainer {\n z-index: 9999;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n width: 100vw;\n height: 100vh;\n overflow: auto;\n\n .modal {\n position: absolute;\n background-color: white;\n }\n }\n\n .label {\n flex: 1;\n margin-right: 0.2rem;\n }\n}\n"],"sourceRoot":""}]);
1377
1377
  // Exports
1378
1378
  ___CSS_LOADER_EXPORT___.locals = {
1379
1379
  "colorInput": `colorInput__7LDDj`,
@@ -11311,6 +11311,40 @@ function Heading({
11311
11311
  // Need HeadingMemo for autocompletion of phpstorm
11312
11312
  const HeadingMemo = withMemo(Heading, (heading_default()), 'text');
11313
11313
 
11314
+ ;// CONCATENATED MODULE: ./src/Components/Layout/Grow.tsx
11315
+
11316
+
11317
+
11318
+
11319
+ const Grow = withForwardRef(function Grow({
11320
+ className,
11321
+ children,
11322
+ center = false,
11323
+ style,
11324
+ weight = 1
11325
+ }, ref) {
11326
+ // Variables
11327
+ // States
11328
+ // Refs
11329
+ // Callbacks
11330
+ // Effects
11331
+ // Other
11332
+ // Render Functions
11333
+ return /*#__PURE__*/external_react_.createElement("div", {
11334
+ ref: ref,
11335
+ className: classnames_default()((layout_default()).grow, {
11336
+ [(layout_default()).center]: center,
11337
+ [(layout_default()).weight0]: weight === 0,
11338
+ [(layout_default()).weight1]: weight === 1,
11339
+ [(layout_default()).weight2]: weight === 2,
11340
+ [(layout_default()).weight3]: weight === 3,
11341
+ [(layout_default()).weight4]: weight === 4,
11342
+ [(layout_default()).weight5]: weight === 5,
11343
+ [(layout_default()).weight6]: weight === 6
11344
+ }, className),
11345
+ style: style
11346
+ }, children);
11347
+ }, (layout_default()));
11314
11348
  ;// CONCATENATED MODULE: ./src/Components/Dialog/DialogBackground.tsx
11315
11349
 
11316
11350
 
@@ -11318,11 +11352,17 @@ const HeadingMemo = withMemo(Heading, (heading_default()), 'text');
11318
11352
 
11319
11353
 
11320
11354
 
11355
+
11356
+
11357
+
11358
+
11359
+
11321
11360
  const DialogBackground = withMemo(function DialogBackground({
11322
11361
  children,
11323
11362
  className,
11324
11363
  style,
11325
- title
11364
+ title,
11365
+ onClose
11326
11366
  }) {
11327
11367
  // Variables
11328
11368
  // Refs
@@ -11336,9 +11376,15 @@ const DialogBackground = withMemo(function DialogBackground({
11336
11376
  __allowChildren: "all",
11337
11377
  className: classnames_default()((dialogBackground_default()).dialogBackground, className),
11338
11378
  style: style
11339
- }, !!title && /*#__PURE__*/external_react_.createElement(HeadingMemo, {
11379
+ }, (!!title || !!onClose) && /*#__PURE__*/external_react_.createElement(Flex_tmp, {
11380
+ horizontal: true,
11340
11381
  className: (dialogBackground_default()).title
11341
- }, title), children);
11382
+ }, !!title && /*#__PURE__*/external_react_.createElement(Grow, null, /*#__PURE__*/external_react_.createElement(HeadingMemo, null, title)), !!onClose && /*#__PURE__*/external_react_.createElement(ClickableMemo, {
11383
+ onClick: onClose
11384
+ }, /*#__PURE__*/external_react_.createElement(Icon, {
11385
+ size: "lg",
11386
+ icon: free_solid_svg_icons_namespaceObject.faCircleXmark
11387
+ }))), children);
11342
11388
  }, (dialogBackground_default()));
11343
11389
  ;// CONCATENATED MODULE: ./src/Components/Dialog/DialogContext.ts
11344
11390
 
@@ -23113,6 +23159,7 @@ var ColorInput_rest = undefined && undefined.__rest || function (s, e) {
23113
23159
 
23114
23160
 
23115
23161
 
23162
+
23116
23163
  function convertToHex(color, disableAlpha) {
23117
23164
  let newColor = `#${color.r.toString(16).padStart(2, '0')}${color.g.toString(16).padStart(2, '0')}${color.b.toString(16).padStart(2, '0')}`;
23118
23165
  if (color.a !== undefined && !disableAlpha) {
@@ -23136,9 +23183,10 @@ function ColorInput(_a) {
23136
23183
  presetColors,
23137
23184
  error,
23138
23185
  sharedColorKey = "default",
23139
- disabled
23186
+ disabled,
23187
+ className
23140
23188
  } = _a,
23141
- otherProps = ColorInput_rest(_a, ["defaultValue", "value", "label", "onChangeColor", "onChangeColorComplete", "onOpen", "onClose", "disableAlpha", "presetColors", "error", "sharedColorKey", "disabled"]);
23189
+ otherProps = ColorInput_rest(_a, ["defaultValue", "value", "label", "onChangeColor", "onChangeColorComplete", "onOpen", "onClose", "disableAlpha", "presetColors", "error", "sharedColorKey", "disabled", "className"]);
23142
23190
  // Refs
23143
23191
  const modalRef = (0,external_react_.useRef)(null);
23144
23192
  // States
@@ -23207,7 +23255,7 @@ function ColorInput(_a) {
23207
23255
  // Other
23208
23256
  // Render Functions
23209
23257
  return /*#__PURE__*/external_react_.createElement(external_react_.Fragment, null, /*#__PURE__*/external_react_.createElement("span", {
23210
- className: (colorInput_default()).colorInput
23258
+ className: classnames_default()((colorInput_default()).colorInput, className)
23211
23259
  }, /*#__PURE__*/external_react_.createElement(Menu, {
23212
23260
  x: position.x,
23213
23261
  y: position.y,
@@ -23301,40 +23349,6 @@ const ColorInputController = withHookController(ColorInputMemo, "onChangeColor")
23301
23349
  // EXTERNAL MODULE: ./src/Components/FormElements/Input/FileInput/fileInput.scss
23302
23350
  var fileInput = __webpack_require__(4372);
23303
23351
  var fileInput_default = /*#__PURE__*/__webpack_require__.n(fileInput);
23304
- ;// CONCATENATED MODULE: ./src/Components/Layout/Grow.tsx
23305
-
23306
-
23307
-
23308
-
23309
- const Grow = withForwardRef(function Grow({
23310
- className,
23311
- children,
23312
- center = false,
23313
- style,
23314
- weight = 1
23315
- }, ref) {
23316
- // Variables
23317
- // States
23318
- // Refs
23319
- // Callbacks
23320
- // Effects
23321
- // Other
23322
- // Render Functions
23323
- return /*#__PURE__*/external_react_.createElement("div", {
23324
- ref: ref,
23325
- className: classnames_default()((layout_default()).grow, {
23326
- [(layout_default()).center]: center,
23327
- [(layout_default()).weight0]: weight === 0,
23328
- [(layout_default()).weight1]: weight === 1,
23329
- [(layout_default()).weight2]: weight === 2,
23330
- [(layout_default()).weight3]: weight === 3,
23331
- [(layout_default()).weight4]: weight === 4,
23332
- [(layout_default()).weight5]: weight === 5,
23333
- [(layout_default()).weight6]: weight === 6
23334
- }, className),
23335
- style: style
23336
- }, children);
23337
- }, (layout_default()));
23338
23352
  // EXTERNAL MODULE: ./src/Components/Image/image.scss
23339
23353
  var Image_image = __webpack_require__(6435);
23340
23354
  var image_default = /*#__PURE__*/__webpack_require__.n(Image_image);
@@ -24125,16 +24139,21 @@ const Select = withMemo(function Select(_a) {
24125
24139
  onChangeValue,
24126
24140
  inline = false,
24127
24141
  small = false,
24128
- error
24142
+ error,
24143
+ useNumericValues
24129
24144
  } = _a,
24130
- otherProps = Select_rest(_a, ["label", "options", "className", "style", "onChangeValue", "inline", "small", "error"]);
24145
+ otherProps = Select_rest(_a, ["label", "options", "className", "style", "onChangeValue", "inline", "small", "error", "useNumericValues"]);
24131
24146
  // Refs
24132
24147
  // States
24133
24148
  // Selectors
24134
24149
  // Callbacks
24135
24150
  const [onChangeWithData, propsWithoutData] = useListenerWithExtractedProps('onChange', otherProps);
24136
24151
  const onChange = (0,external_react_.useCallback)(e => {
24137
- onChangeValue === null || onChangeValue === void 0 ? void 0 : onChangeValue(e.target.value);
24152
+ if (useNumericValues) {
24153
+ onChangeValue === null || onChangeValue === void 0 ? void 0 : onChangeValue(Number(e.target.value));
24154
+ } else {
24155
+ onChangeValue === null || onChangeValue === void 0 ? void 0 : onChangeValue(e.target.value);
24156
+ }
24138
24157
  onChangeWithData(e);
24139
24158
  }, [onChangeWithData, onChangeValue]);
24140
24159
  // Effects