@bagelink/vue 1.0.1 → 1.0.3

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.
@@ -18,6 +18,7 @@ interface NumberInputProps {
18
18
  layout?: NumberLayout;
19
19
  center?: boolean;
20
20
  padZero?: number;
21
+ useGrouping?: boolean;
21
22
  }
22
23
  declare const _default: import('vue').DefineComponent<NumberInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
23
24
  "update:modelValue": (...args: any[]) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"NumberInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/NumberInput.vue"],"names":[],"mappings":"AAuOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAI7C,KAAK,YAAY,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,CAAA;AAEzD,UAAU,gBAAgB;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,QAAQ,CAAA;IACpB,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;CAChB;;;;;;AA6VD,wBAQG"}
1
+ {"version":3,"file":"NumberInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/NumberInput.vue"],"names":[],"mappings":"AAyOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAI7C,KAAK,YAAY,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,CAAA;AAEzD,UAAU,gBAAgB;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,QAAQ,CAAA;IACpB,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,OAAO,CAAA;CACrB;;;;;;AA8VD,wBAQG"}
package/dist/index.cjs CHANGED
@@ -17329,7 +17329,8 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
17329
17329
  helptext: {},
17330
17330
  layout: {},
17331
17331
  center: { type: Boolean },
17332
- padZero: { default: 1 }
17332
+ padZero: { default: 1 },
17333
+ useGrouping: { type: Boolean, default: true }
17333
17334
  },
17334
17335
  emits: ["update:modelValue"],
17335
17336
  setup(__props, { emit: __emit }) {
@@ -17371,7 +17372,7 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
17371
17372
  const formatter = new Intl.NumberFormat("en-US", {
17372
17373
  minimumFractionDigits: 0,
17373
17374
  maximumFractionDigits: 20,
17374
- useGrouping: true
17375
+ useGrouping: __props.useGrouping
17375
17376
  });
17376
17377
  const formattedNum = formatter.format(num);
17377
17378
  const [integerPart, decimalPart] = formattedNum.split(".");
@@ -17434,7 +17435,7 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
17434
17435
  readonly: _ctx.disabled,
17435
17436
  inputmode: "decimal",
17436
17437
  autocomplete: "off",
17437
- pattern: "^-?\\d*\\.?\\d*$",
17438
+ pattern: "^-?\\d{1,3}(,\\d{3})*(\\.\\d+)?$",
17438
17439
  autocorrect: "off",
17439
17440
  spellcheck: "false",
17440
17441
  onInput: inputHandler,
@@ -17500,7 +17501,7 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
17500
17501
  };
17501
17502
  }
17502
17503
  });
17503
- const NumberInput = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-8f9331b5"]]);
17504
+ const NumberInput = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-a3a46563"]]);
17504
17505
  const _hoisted_1$z = ["value", "autofocus", "onKeydown", "onPaste"];
17505
17506
  const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
17506
17507
  __name: "OTP",
package/dist/index.mjs CHANGED
@@ -17327,7 +17327,8 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
17327
17327
  helptext: {},
17328
17328
  layout: {},
17329
17329
  center: { type: Boolean },
17330
- padZero: { default: 1 }
17330
+ padZero: { default: 1 },
17331
+ useGrouping: { type: Boolean, default: true }
17331
17332
  },
17332
17333
  emits: ["update:modelValue"],
17333
17334
  setup(__props, { emit: __emit }) {
@@ -17369,7 +17370,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
17369
17370
  const formatter = new Intl.NumberFormat("en-US", {
17370
17371
  minimumFractionDigits: 0,
17371
17372
  maximumFractionDigits: 20,
17372
- useGrouping: true
17373
+ useGrouping: __props.useGrouping
17373
17374
  });
17374
17375
  const formattedNum = formatter.format(num);
17375
17376
  const [integerPart, decimalPart] = formattedNum.split(".");
@@ -17432,7 +17433,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
17432
17433
  readonly: _ctx.disabled,
17433
17434
  inputmode: "decimal",
17434
17435
  autocomplete: "off",
17435
- pattern: "^-?\\d*\\.?\\d*$",
17436
+ pattern: "^-?\\d{1,3}(,\\d{3})*(\\.\\d+)?$",
17436
17437
  autocorrect: "off",
17437
17438
  spellcheck: "false",
17438
17439
  onInput: inputHandler,
@@ -17498,7 +17499,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
17498
17499
  };
17499
17500
  }
17500
17501
  });
17501
- const NumberInput = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-8f9331b5"]]);
17502
+ const NumberInput = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-a3a46563"]]);
17502
17503
  const _hoisted_1$z = ["value", "autofocus", "onKeydown", "onPaste"];
17503
17504
  const _sfc_main$G = /* @__PURE__ */ defineComponent({
17504
17505
  __name: "OTP",
package/dist/style.css CHANGED
@@ -1847,14 +1847,14 @@ pre code.hljs{
1847
1847
  direction: ltr;
1848
1848
  }
1849
1849
 
1850
- .txtInputIconStart .iconStart[data-v-8f9331b5] {
1850
+ .txtInputIconStart .iconStart[data-v-a3a46563] {
1851
1851
  color: var(--input-color);
1852
1852
  position: absolute;
1853
1853
  inset-inline-start:calc(var(--input-height) / 3 - 0.25rem);
1854
1854
  margin-top: calc(var(--input-height) / 2 );
1855
1855
  line-height: 0;
1856
1856
  }
1857
- .textInputSpinnerWrap .spinner[data-v-8f9331b5] {
1857
+ .textInputSpinnerWrap .spinner[data-v-a3a46563] {
1858
1858
  color: var(--input-color);
1859
1859
  position: absolute;
1860
1860
  inset-inline-end: 0;
@@ -1864,18 +1864,18 @@ pre code.hljs{
1864
1864
  flex-direction: column;
1865
1865
  gap: 0;
1866
1866
  }
1867
- .top-bgl-ctrl-num-btn[data-v-8f9331b5]{
1867
+ .top-bgl-ctrl-num-btn[data-v-a3a46563]{
1868
1868
  margin-top: calc(var(--input-height) / 10) !important;
1869
1869
  }
1870
- .bgl-ctrl-num-btn[data-v-8f9331b5]{
1870
+ .bgl-ctrl-num-btn[data-v-a3a46563]{
1871
1871
  height: calc(var(--input-height) / 2.5) !important;
1872
1872
  isolation: isolate;
1873
1873
  }
1874
- .bgl-big-ctrl-num-btn[data-v-8f9331b5]{
1874
+ .bgl-big-ctrl-num-btn[data-v-a3a46563]{
1875
1875
  width: 100% !important;
1876
1876
  isolation: isolate;
1877
1877
  }
1878
- .bgl-number-input[data-v-8f9331b5]{
1878
+ .bgl-number-input[data-v-a3a46563]{
1879
1879
  padding-inline-end: 1.75rem !important;
1880
1880
  }
1881
1881
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "1.0.1",
4
+ "version": "1.0.3",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
@@ -23,6 +23,7 @@ interface NumberInputProps {
23
23
  layout?: NumberLayout
24
24
  center?: boolean
25
25
  padZero?: number
26
+ useGrouping?: boolean
26
27
  }
27
28
 
28
29
  const {
@@ -41,7 +42,8 @@ const {
41
42
  layout,
42
43
  id,
43
44
  padZero = 1,
44
- defaultValue
45
+ defaultValue,
46
+ useGrouping = true
45
47
  } = defineProps<NumberInputProps>()
46
48
 
47
49
  const emit = defineEmits(['update:modelValue'])
@@ -90,7 +92,7 @@ function formatNumber(num: number) {
90
92
  const formatter = new Intl.NumberFormat('en-US', {
91
93
  minimumFractionDigits: 0,
92
94
  maximumFractionDigits: 20,
93
- useGrouping: true
95
+ useGrouping
94
96
  })
95
97
 
96
98
  const formattedNum = formatter.format(num)
@@ -161,7 +163,7 @@ watch(() => modelValue, (newVal) => {
161
163
  :readonly="disabled"
162
164
  inputmode="decimal"
163
165
  autocomplete="off"
164
- pattern="^-?\d*\.?\d*$"
166
+ pattern="^-?\d{1,3}(,\d{3})*(\.\d+)?$"
165
167
  autocorrect="off"
166
168
  spellcheck="false"
167
169
  @input="inputHandler"