@onereach/ui-components 2.71.2-beta.2241.0 → 2.71.2
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/bundled/v2/{OrCardCollection-c1ccde63.js → OrCardCollection-091e2193.js} +1 -1
- package/dist/bundled/v2/{OrCardCollection-89428bbf.js → OrCardCollection-166cfcc6.js} +5 -5
- package/dist/bundled/v2/{OrConfirm-56d01cff.js → OrConfirm-55b89b17.js} +4 -4
- package/dist/bundled/v2/{OrConfirm-cc8b767f.js → OrConfirm-bb2df177.js} +1 -1
- package/dist/bundled/v2/{OrInput-c539e47c.js → OrInput-5404a234.js} +6 -23
- package/dist/bundled/v2/{OrListOfInputs-8f076650.js → OrListOfInputs-ab7f9d97.js} +4 -4
- package/dist/bundled/v2/OrNumberInput-face8ccc.js +227 -0
- package/dist/bundled/v2/OrPassword-a818e7b5.js +227 -0
- package/dist/bundled/v2/{OrSearch-f7cfa52f.js → OrSearch-832d7978.js} +4 -4
- package/dist/bundled/v2/{OrSearch-d7326373.js → OrSearch-d1169241.js} +1 -1
- package/dist/bundled/v2/{OrSelect-8802f330.js → OrSelect-5634790b.js} +1 -1
- package/dist/bundled/v2/{OrPassword-7da938aa.js → OrTextarea-71ff236d.js} +7 -449
- package/dist/bundled/v2/components/index.d.ts +5 -1
- package/dist/bundled/v2/components/index.js +15 -13
- package/dist/bundled/v2/components/or-card-collection/index.js +4 -4
- package/dist/bundled/v2/components/or-card-collection-v3/index.js +3 -3
- package/dist/bundled/v2/components/or-confirm/index.js +2 -2
- package/dist/bundled/v2/components/or-confirm-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-input/index.d.ts +1 -0
- package/dist/bundled/v2/components/or-input/index.js +13 -0
- package/dist/bundled/v2/components/or-input-v3/OrInput.vue.d.ts +0 -13
- package/dist/bundled/v2/components/or-input-v3/index.js +1 -2
- package/dist/bundled/v2/components/or-list-of-inputs/index.js +2 -2
- package/dist/bundled/v2/components/or-number-input/index.d.ts +1 -0
- package/dist/bundled/v2/components/or-number-input/index.js +14 -0
- package/dist/bundled/v2/components/or-password/index.d.ts +1 -0
- package/dist/bundled/v2/components/{or-inputs → or-password}/index.js +3 -4
- package/dist/bundled/v2/components/or-search/index.d.ts +1 -0
- package/dist/bundled/v2/components/or-search/index.js +25 -0
- package/dist/bundled/v2/components/or-search-v3/index.js +2 -3
- package/dist/bundled/v2/components/or-select-v3/index.js +2 -3
- package/dist/bundled/v2/components/or-textarea/index.d.ts +1 -0
- package/dist/bundled/v2/components/or-textarea/index.js +13 -0
- package/dist/bundled/v2/index.js +13 -11
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-f9897e01.js → OrCardCollection.vue_vue_type_script_lang-60403ae6.js} +1 -1
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-d8124dda.js → OrCardCollection.vue_vue_type_script_lang-cd84f344.js} +4 -4
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-0f16fc67.js → OrConfirm.vue_vue_type_script_lang-41b4d791.js} +2 -1
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-e9ba9909.js → OrConfirm.vue_vue_type_script_lang-9231d51e.js} +2 -2
- package/dist/bundled/v3/{OrInput-41f8351a.js → OrInput-2a7c6b57.js} +4 -13
- package/dist/bundled/v3/{OrInput-7d4b571a.js → OrInput-704e72ba.js} +5 -193
- package/dist/bundled/v3/OrInput.vue_vue_type_script_lang-409235cc.js +190 -0
- package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-b88324b6.js → OrInput.vue_vue_type_script_lang-509de504.js} +1 -13
- package/dist/bundled/v3/{OrListOfInputs.vue_vue_type_script_lang-62dbf1e7.js → OrListOfInputs.vue_vue_type_script_lang-6c5cf7a5.js} +2 -1
- package/dist/bundled/v3/OrNumberInput.vue_vue_type_script_lang-f061d829.js +113 -0
- package/dist/bundled/v3/OrPassword.vue_vue_type_script_lang-b75f6543.js +99 -0
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-16fbccc0.js → OrSearch.vue_vue_type_script_lang-5356fa79.js} +2 -1
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-56eb4e93.js → OrSearch.vue_vue_type_script_lang-ab2ef22c.js} +2 -2
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-ee433d47.js → OrSelect.vue_vue_type_script_lang-54f683a2.js} +2 -2
- package/dist/bundled/v3/OrTextarea.vue_vue_type_script_lang-69ea22e9.js +187 -0
- package/dist/bundled/v3/components/index.d.ts +5 -1
- package/dist/bundled/v3/components/index.js +17 -14
- package/dist/bundled/v3/components/or-card-collection/index.js +5 -4
- package/dist/bundled/v3/components/or-card-collection-v3/index.js +4 -4
- package/dist/bundled/v3/components/or-confirm/index.js +3 -2
- package/dist/bundled/v3/components/or-confirm-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-input/index.d.ts +1 -0
- package/dist/bundled/v3/components/or-input/index.js +14 -0
- package/dist/bundled/v3/components/or-input-v3/OrInput.vue.d.ts +0 -13
- package/dist/bundled/v3/components/or-input-v3/index.js +1 -3
- package/dist/bundled/v3/components/or-list-of-inputs/index.js +3 -2
- package/dist/bundled/v3/components/or-number-input/index.d.ts +1 -0
- package/dist/bundled/v3/components/or-number-input/index.js +16 -0
- package/dist/bundled/v3/components/or-password/index.d.ts +1 -0
- package/dist/bundled/v3/components/or-password/index.js +31 -0
- package/dist/bundled/v3/components/or-search/index.d.ts +1 -0
- package/dist/bundled/v3/components/{or-inputs → or-search}/index.js +4 -5
- package/dist/bundled/v3/components/or-search-v3/index.js +3 -5
- package/dist/bundled/v3/components/or-select-v3/index.js +3 -5
- package/dist/bundled/v3/components/or-textarea/index.d.ts +1 -0
- package/dist/bundled/v3/components/or-textarea/index.js +14 -0
- package/dist/bundled/v3/index.js +664 -659
- package/dist/esm/v2/{OrCardCollection-f6b07557.js → OrCardCollection-19582949.js} +6 -7
- package/dist/esm/v2/{OrCardCollection-ff1e9819.js → OrCardCollection-bbdb6159.js} +1 -1
- package/dist/esm/v2/{OrConfirm-ec81498e.js → OrConfirm-cfaf4266.js} +1 -1
- package/dist/esm/v2/{OrConfirm-d7112dd3.js → OrConfirm-ede619eb.js} +4 -4
- package/dist/esm/v2/{OrSearch.vue_rollup-plugin-vue_script-197d77fc.js → OrInput-6e6cfd11.js} +4 -492
- package/dist/esm/v2/{OrInput-b029d058.js → OrInput-e8fe9102.js} +6 -23
- package/dist/esm/v2/{OrListOfInputs-50aa1ef1.js → OrListOfInputs-4298fa2c.js} +5 -5
- package/dist/esm/v2/OrNumberInput-b20d75d2.js +225 -0
- package/dist/esm/v2/OrPassword-e6d5e968.js +225 -0
- package/dist/esm/v2/{OrSearch-1c934f72.js → OrSearch-4b774707.js} +1 -1
- package/dist/esm/v2/{OrSearch-0589d17d.js → OrSearch-b4f4d59b.js} +122 -5
- package/dist/esm/v2/{OrSelect-cfcb233a.js → OrSelect-d7016575.js} +1 -1
- package/dist/esm/v2/{OrPassword-1fa97156.js → OrTextarea-91a95068.js} +187 -245
- package/dist/esm/v2/components/index.d.ts +5 -1
- package/dist/esm/v2/components/index.js +15 -13
- package/dist/esm/v2/components/or-card-collection/index.js +3 -4
- package/dist/esm/v2/components/or-card-collection-v3/index.js +3 -3
- package/dist/esm/v2/components/or-confirm/index.js +2 -3
- package/dist/esm/v2/components/or-confirm-v3/index.js +3 -3
- package/dist/esm/v2/components/or-input/index.d.ts +1 -0
- package/dist/esm/v2/components/or-input/index.js +11 -0
- package/dist/esm/v2/components/or-input-v3/OrInput.vue.d.ts +0 -13
- package/dist/esm/v2/components/or-input-v3/index.js +2 -3
- package/dist/esm/v2/components/or-list-of-inputs/index.js +2 -4
- package/dist/esm/v2/components/or-number-input/index.d.ts +1 -0
- package/dist/esm/v2/components/or-number-input/index.js +12 -0
- package/dist/esm/v2/components/or-password/index.d.ts +1 -0
- package/dist/esm/v2/components/{or-inputs → or-password}/index.js +5 -6
- package/dist/esm/v2/components/or-search/index.d.ts +1 -0
- package/dist/esm/v2/components/or-search/index.js +23 -0
- package/dist/esm/v2/components/or-search-v3/index.js +3 -4
- package/dist/esm/v2/components/or-select-v3/index.js +3 -4
- package/dist/esm/v2/components/or-textarea/index.d.ts +1 -0
- package/dist/esm/v2/components/or-textarea/index.js +11 -0
- package/dist/esm/v2/index.js +13 -11
- package/dist/esm/v3/{OrCardCollection-a5e326ef.js → OrCardCollection-1e44c758.js} +2 -2
- package/dist/esm/v3/{OrCardCollection-5ecdcbaf.js → OrCardCollection-47f61c40.js} +1 -1
- package/dist/esm/v3/{OrConfirm-f39bd784.js → OrConfirm-c11ee2ec.js} +1 -1
- package/dist/esm/v3/{OrConfirm-beeb74d6.js → OrConfirm-e7cbf54c.js} +1 -1
- package/dist/esm/v3/{OrInput-8a4573cd.js → OrInput-6fb81556.js} +4 -24
- package/dist/esm/v3/OrInput-81125804.js +295 -0
- package/dist/esm/v3/{OrListOfInputs-7a67440f.js → OrListOfInputs-508e056f.js} +1 -1
- package/dist/esm/v3/OrNumberInput-b32b5ce3.js +170 -0
- package/dist/esm/v3/OrPassword-b0cbb578.js +162 -0
- package/dist/esm/v3/OrSearch-11fdf667.js +188 -0
- package/dist/esm/v3/{OrSearch-10d09806.js → OrSearch-e15955a7.js} +1 -1
- package/dist/esm/v3/{OrSelect-1e4c6062.js → OrSelect-027b5e8f.js} +1 -1
- package/dist/esm/v3/OrTextarea-1f5c3be1.js +290 -0
- package/dist/esm/v3/components/index.d.ts +5 -1
- package/dist/esm/v3/components/index.js +15 -11
- package/dist/esm/v3/components/or-card-collection/index.js +3 -3
- package/dist/esm/v3/components/or-card-collection-v3/index.js +3 -3
- package/dist/esm/v3/components/or-confirm/index.js +2 -3
- package/dist/esm/v3/components/or-confirm-v3/index.js +3 -3
- package/dist/esm/v3/components/or-input/index.d.ts +1 -0
- package/dist/esm/v3/components/or-input/index.js +11 -0
- package/dist/esm/v3/components/or-input-v3/OrInput.vue.d.ts +0 -13
- package/dist/esm/v3/components/or-input-v3/index.js +2 -3
- package/dist/esm/v3/components/or-list-of-inputs/index.js +2 -4
- package/dist/esm/v3/components/or-number-input/index.d.ts +1 -0
- package/dist/esm/v3/components/or-number-input/index.js +12 -0
- package/dist/esm/v3/components/or-password/index.d.ts +1 -0
- package/dist/esm/v3/components/{or-inputs → or-password}/index.js +3 -2
- package/dist/esm/v3/components/or-search/index.d.ts +1 -0
- package/dist/esm/v3/components/or-search/index.js +20 -0
- package/dist/esm/v3/components/or-search-v3/index.js +3 -4
- package/dist/esm/v3/components/or-select-v3/index.js +3 -4
- package/dist/esm/v3/components/or-textarea/index.d.ts +1 -0
- package/dist/esm/v3/components/or-textarea/index.js +11 -0
- package/dist/esm/v3/index.js +13 -9
- package/package.json +3 -2
- package/src/components/index.ts +5 -1
- package/src/components/or-card-collection/OrCardCollection.vue +8 -8
- package/src/components/or-confirm/OrConfirm.vue +1 -1
- package/src/components/or-input/index.ts +1 -0
- package/src/components/or-input-v3/OrInput.stories3.ts +0 -4
- package/src/components/or-input-v3/OrInput.vue +17 -37
- package/src/components/or-list/OrList.stories.ts +1 -1
- package/src/components/or-list-of-inputs/OrListOfInputs.vue +1 -1
- package/src/components/or-modal/OrModal.stories.ts +1 -1
- package/src/components/{or-inputs → or-number-input}/OrNumberInput.vue +1 -1
- package/src/components/or-number-input/index.ts +1 -0
- package/src/components/{or-inputs → or-password}/OrPassword.vue +1 -1
- package/src/components/or-password/index.ts +1 -0
- package/src/components/{or-inputs → or-search}/OrSearch.vue +1 -1
- package/src/components/or-search/index.ts +1 -0
- package/src/components/{or-inputs → or-textarea}/OrTextarea.vue +225 -6
- package/src/components/or-textarea/index.ts +1 -0
- package/dist/bundled/v2/components/or-inputs/index.d.ts +0 -5
- package/dist/bundled/v3/OrPassword.vue_vue_type_script_lang-13bc5b00.js +0 -390
- package/dist/bundled/v3/components/or-inputs/index.d.ts +0 -5
- package/dist/esm/v2/components/or-inputs/index.d.ts +0 -5
- package/dist/esm/v3/OrSearch-7cb2c91c.js +0 -1075
- package/dist/esm/v3/components/or-inputs/index.d.ts +0 -5
- package/src/components/or-inputs/index.ts +0 -5
- /package/dist/bundled/v2/{OrInput-08f2f666.js → OrInput-df1a14fa.js} +0 -0
- /package/dist/bundled/v2/components/{or-inputs → or-input}/OrInput.vue.d.ts +0 -0
- /package/dist/bundled/v2/components/{or-inputs → or-number-input}/OrNumberInput.vue.d.ts +0 -0
- /package/dist/bundled/v2/components/{or-inputs → or-password}/OrPassword.vue.d.ts +0 -0
- /package/dist/bundled/v2/components/{or-inputs → or-search}/OrSearch.vue.d.ts +0 -0
- /package/dist/bundled/v2/components/{or-inputs → or-textarea}/OrTextarea.vue.d.ts +0 -0
- /package/dist/bundled/v3/components/{or-inputs → or-input}/OrInput.vue.d.ts +0 -0
- /package/dist/bundled/v3/components/{or-inputs → or-number-input}/OrNumberInput.vue.d.ts +0 -0
- /package/dist/bundled/v3/components/{or-inputs → or-password}/OrPassword.vue.d.ts +0 -0
- /package/dist/bundled/v3/components/{or-inputs → or-search}/OrSearch.vue.d.ts +0 -0
- /package/dist/bundled/v3/components/{or-inputs → or-textarea}/OrTextarea.vue.d.ts +0 -0
- /package/dist/esm/v2/components/{or-inputs → or-input}/OrInput.vue.d.ts +0 -0
- /package/dist/esm/v2/components/{or-inputs → or-number-input}/OrNumberInput.vue.d.ts +0 -0
- /package/dist/esm/v2/components/{or-inputs → or-password}/OrPassword.vue.d.ts +0 -0
- /package/dist/esm/v2/components/{or-inputs → or-search}/OrSearch.vue.d.ts +0 -0
- /package/dist/esm/v2/components/{or-inputs → or-textarea}/OrTextarea.vue.d.ts +0 -0
- /package/dist/esm/v3/components/{or-inputs → or-input}/OrInput.vue.d.ts +0 -0
- /package/dist/esm/v3/components/{or-inputs → or-number-input}/OrNumberInput.vue.d.ts +0 -0
- /package/dist/esm/v3/components/{or-inputs → or-password}/OrPassword.vue.d.ts +0 -0
- /package/dist/esm/v3/components/{or-inputs → or-search}/OrSearch.vue.d.ts +0 -0
- /package/dist/esm/v3/components/{or-inputs → or-textarea}/OrTextarea.vue.d.ts +0 -0
- /package/src/components/{or-inputs → or-input}/OrInput.stories.ts +0 -0
- /package/src/components/{or-inputs → or-input}/OrInput.vue +0 -0
- /package/src/components/{or-inputs → or-input}/or-textbox-migration.stories.mdx +0 -0
- /package/src/components/{or-inputs → or-input}/styles.scss +0 -0
- /package/src/components/{or-inputs → or-number-input}/OrNumberInput.stories.ts +0 -0
- /package/src/components/{or-inputs → or-password}/OrPassword.stories.ts +0 -0
- /package/src/components/{or-inputs → or-search}/OrSearch.stories.ts +0 -0
- /package/src/components/{or-inputs → or-textarea}/OrTextarea.stories.ts +0 -0
|
@@ -114,11 +114,7 @@
|
|
|
114
114
|
</template>
|
|
115
115
|
|
|
116
116
|
<script lang="ts">
|
|
117
|
-
import {
|
|
118
|
-
defineComponent,
|
|
119
|
-
ref,
|
|
120
|
-
getCurrentInstance,
|
|
121
|
-
} from 'vue-demi';
|
|
117
|
+
import { defineComponent, ref, getCurrentInstance } from 'vue-demi';
|
|
122
118
|
import { pxToRem } from '../../utils/functions/px-to-rem';
|
|
123
119
|
import {
|
|
124
120
|
cancelAF,
|
|
@@ -319,5 +315,228 @@ export default defineComponent({
|
|
|
319
315
|
</script>
|
|
320
316
|
|
|
321
317
|
<style lang="scss" scoped>
|
|
322
|
-
@
|
|
318
|
+
@use "~@onereach/styles/src/global" as *;
|
|
319
|
+
|
|
320
|
+
.or-textbox {
|
|
321
|
+
display: flex;
|
|
322
|
+
align-items: flex-start;
|
|
323
|
+
justify-content: flex-start;
|
|
324
|
+
width: 100%;
|
|
325
|
+
|
|
326
|
+
&.is-show-info.has-label {
|
|
327
|
+
align-items: center;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
&.has-label {
|
|
331
|
+
align-items: flex-end;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.or-label {
|
|
335
|
+
margin-bottom: $s-1;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
&--append,
|
|
339
|
+
&--prepend {
|
|
340
|
+
position: relative;
|
|
341
|
+
display: flex;
|
|
342
|
+
align-items: center;
|
|
343
|
+
height: px-to-rem(36);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
&--append {
|
|
347
|
+
margin-left: px-to-rem(10);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
&--prepend {
|
|
351
|
+
margin-right: px-to-rem(10);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
&--wrapper {
|
|
355
|
+
width: 100%;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
&--input {
|
|
359
|
+
width: 100%;
|
|
360
|
+
min-width: px-to-rem(114);
|
|
361
|
+
height: px-to-rem(36);
|
|
362
|
+
padding: px-to-rem(10);
|
|
363
|
+
font-family: inherit;
|
|
364
|
+
font-size: $fs-1;
|
|
365
|
+
background-color: $c-neutral-1;
|
|
366
|
+
border: 1px solid $c-neutral-2;
|
|
367
|
+
border-radius: $s-2;
|
|
368
|
+
outline: none;
|
|
369
|
+
|
|
370
|
+
@include transition(border-color, background-color, -webkit-box-shadow);
|
|
371
|
+
|
|
372
|
+
&-textarea {
|
|
373
|
+
/* stylelint-disable-next-line scss/at-extend-no-missing-placeholder */
|
|
374
|
+
@extend .or-textbox--input;
|
|
375
|
+
|
|
376
|
+
min-height: px-to-rem(79);
|
|
377
|
+
max-height: px-to-rem(142);
|
|
378
|
+
overflow-x: hidden;
|
|
379
|
+
overflow-y: auto;
|
|
380
|
+
resize: none;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
&-wrapper {
|
|
384
|
+
position: relative;
|
|
385
|
+
width: 100%;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
&::placeholder {
|
|
389
|
+
color: $c-neutral-4;
|
|
390
|
+
|
|
391
|
+
@include transition(opacity);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
&:-webkit-autofill {
|
|
395
|
+
-webkit-box-shadow: inset 0 0 0 50px $c-neutral-1;
|
|
396
|
+
|
|
397
|
+
@include focus {
|
|
398
|
+
-webkit-box-shadow: inset 0 0 0 50px $c-white;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
@include hover {
|
|
403
|
+
background-color: $c-white;
|
|
404
|
+
border-color: $c-neutral-2-darken-3;
|
|
405
|
+
-webkit-box-shadow: inset 0 0 0 50px $c-white;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
@include active {
|
|
409
|
+
&:not(:focus) {
|
|
410
|
+
border-color: $c-neutral-2-darken-5;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
@include focus {
|
|
415
|
+
background-color: $c-white;
|
|
416
|
+
border-color: $c-primary;
|
|
417
|
+
|
|
418
|
+
&::placeholder {
|
|
419
|
+
opacity: 0;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
@include disabled {
|
|
424
|
+
background-color: $c-neutral-2;
|
|
425
|
+
border-color: $c-neutral-2;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
@include has-error {
|
|
429
|
+
border-color: $c-error;
|
|
430
|
+
|
|
431
|
+
@include hover {
|
|
432
|
+
border-color: $c-error-darken-3;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
@include focus {
|
|
436
|
+
border-color: $c-error-darken-5;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
@include disabled {
|
|
440
|
+
border-color: $c-error-lighten-20;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
&--textarea {
|
|
446
|
+
/* stylelint-disable-next-line scss/at-extend-no-missing-placeholder */
|
|
447
|
+
@extend .or-textbox--input;
|
|
448
|
+
|
|
449
|
+
min-height: px-to-rem(79);
|
|
450
|
+
max-height: px-to-rem(142);
|
|
451
|
+
overflow-x: hidden;
|
|
452
|
+
overflow-y: auto;
|
|
453
|
+
resize: none;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
&--info {
|
|
457
|
+
width: 100%;
|
|
458
|
+
margin: 0;
|
|
459
|
+
|
|
460
|
+
@include transition(height, opacity);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
&--counter {
|
|
464
|
+
flex-shrink: 0;
|
|
465
|
+
margin-left: auto;
|
|
466
|
+
font-size: $fs-0;
|
|
467
|
+
line-height: px-to-rem(14);
|
|
468
|
+
color: $c-neutral-4;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
&--hint,
|
|
472
|
+
&-error {
|
|
473
|
+
flex-shrink: 1;
|
|
474
|
+
|
|
475
|
+
@include transition(height, opacity);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
&.is-small {
|
|
479
|
+
.or-textbox {
|
|
480
|
+
&--input {
|
|
481
|
+
height: px-to-rem(30);
|
|
482
|
+
padding: px-to-rem(8) px-to-rem(10);
|
|
483
|
+
font-size: $fs-0;
|
|
484
|
+
|
|
485
|
+
&-toggle-btn {
|
|
486
|
+
.material-icons {
|
|
487
|
+
font-size: $fs-1;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
&.has-counter {
|
|
495
|
+
.or-textbox {
|
|
496
|
+
&--hint,
|
|
497
|
+
&--error {
|
|
498
|
+
padding-right: px-to-rem(15);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
&.is-show-info {
|
|
504
|
+
.or-textbox {
|
|
505
|
+
&--info {
|
|
506
|
+
display: flex;
|
|
507
|
+
align-items: flex-start;
|
|
508
|
+
justify-content: space-between;
|
|
509
|
+
padding-top: px-to-rem(4);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
@include disabled {
|
|
515
|
+
.or-textbox {
|
|
516
|
+
&--input-toggle-btn {
|
|
517
|
+
pointer-events: none;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
@include has-error {
|
|
523
|
+
.or-textbox {
|
|
524
|
+
&--input {
|
|
525
|
+
border-color: $c-error;
|
|
526
|
+
|
|
527
|
+
@include hover {
|
|
528
|
+
border-color: $c-error-darken-3;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
@include focus {
|
|
532
|
+
border-color: $c-error-darken-5;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
@include disabled {
|
|
536
|
+
border-color: $c-error;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
323
542
|
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as OrTextarea } from './OrTextarea.vue';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { default as OrTextarea } from './OrTextarea.vue';
|
|
2
|
-
export { default as OrInput } from './OrInput.vue';
|
|
3
|
-
export { default as OrNumberInput } from './OrNumberInput.vue';
|
|
4
|
-
export { default as OrPassword } from './OrPassword.vue';
|
|
5
|
-
export { default as OrSearch } from './OrSearch.vue';
|
|
@@ -1,390 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, getCurrentInstance } from 'vue';
|
|
2
|
-
import { p as pxToRem } from './px-to-rem-0b26b83e.js';
|
|
3
|
-
import { s as setStyle, r as requestAF, g as getCS, a as reflow, c as cancelAF } from './dom-d21d0a92.js';
|
|
4
|
-
import './OrLabel-e412c532.js';
|
|
5
|
-
import './OrHint-c9114268.js';
|
|
6
|
-
import './OrError-b43ebad8.js';
|
|
7
|
-
import './OrCollapse-63e83681.js';
|
|
8
|
-
import { s as script$3 } from './OrLabel.vue_vue_type_script_lang-27f8b12d.js';
|
|
9
|
-
import { s as script$4 } from './OrHint.vue_vue_type_script_lang-78598c8e.js';
|
|
10
|
-
import { s as script$5 } from './OrError.vue_vue_type_script_lang-7c39e012.js';
|
|
11
|
-
import { s as script$6 } from './OrCollapse.vue_vue_type_script_lang-65cbb754.js';
|
|
12
|
-
import { s as script$7 } from './OrInput-7d4b571a.js';
|
|
13
|
-
import { useVModel } from '@vueuse/core';
|
|
14
|
-
import './OrIconButton-e637158e.js';
|
|
15
|
-
import { u as useToggle } from './useToggle-09b6cb90.js';
|
|
16
|
-
import { b as BUTTON_SIZE } from './constants-c5d1139f.js';
|
|
17
|
-
import { s as script$8 } from './OrIconButton.vue_vue_type_script_lang-40547ab0.js';
|
|
18
|
-
|
|
19
|
-
var script$2 = defineComponent({
|
|
20
|
-
name: 'OrTextarea',
|
|
21
|
-
components: {
|
|
22
|
-
OrLabel: script$3,
|
|
23
|
-
OrHint: script$4,
|
|
24
|
-
OrError: script$5,
|
|
25
|
-
OrCollapse: script$6
|
|
26
|
-
},
|
|
27
|
-
model: {
|
|
28
|
-
prop: 'modelValue',
|
|
29
|
-
event: 'update:modelValue'
|
|
30
|
-
},
|
|
31
|
-
props: {
|
|
32
|
-
modelValue: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: '',
|
|
35
|
-
required: false
|
|
36
|
-
},
|
|
37
|
-
htmlId: {
|
|
38
|
-
type: String,
|
|
39
|
-
default: '',
|
|
40
|
-
required: false
|
|
41
|
-
},
|
|
42
|
-
placeholder: {
|
|
43
|
-
type: String,
|
|
44
|
-
default: '',
|
|
45
|
-
required: false
|
|
46
|
-
},
|
|
47
|
-
label: {
|
|
48
|
-
type: String,
|
|
49
|
-
default: '',
|
|
50
|
-
required: false
|
|
51
|
-
},
|
|
52
|
-
error: {
|
|
53
|
-
type: String,
|
|
54
|
-
default: '',
|
|
55
|
-
required: false
|
|
56
|
-
},
|
|
57
|
-
hint: {
|
|
58
|
-
type: String,
|
|
59
|
-
default: '',
|
|
60
|
-
required: false
|
|
61
|
-
},
|
|
62
|
-
maxLength: {
|
|
63
|
-
type: Number,
|
|
64
|
-
default: undefined,
|
|
65
|
-
required: false
|
|
66
|
-
},
|
|
67
|
-
isSmall: Boolean,
|
|
68
|
-
isRequired: Boolean,
|
|
69
|
-
isDisabled: Boolean,
|
|
70
|
-
isReadonly: Boolean,
|
|
71
|
-
isInvalid: Boolean
|
|
72
|
-
},
|
|
73
|
-
emits: ['focus', 'blur', 'update:modelValue', 'input', 'keypress', 'keyup', 'keydown'],
|
|
74
|
-
setup() {
|
|
75
|
-
const inputRef = ref();
|
|
76
|
-
return {
|
|
77
|
-
inputRef
|
|
78
|
-
};
|
|
79
|
-
},
|
|
80
|
-
data() {
|
|
81
|
-
return {
|
|
82
|
-
reqAF: null,
|
|
83
|
-
isFocused: false
|
|
84
|
-
};
|
|
85
|
-
},
|
|
86
|
-
computed: {
|
|
87
|
-
localValue() {
|
|
88
|
-
if (this.maxLength && this.modelValue.length > this.maxLength) {
|
|
89
|
-
return this.modelValue.slice(0, -(this.modelValue.length - this.maxLength));
|
|
90
|
-
}
|
|
91
|
-
return this.modelValue;
|
|
92
|
-
},
|
|
93
|
-
localId() {
|
|
94
|
-
var _a;
|
|
95
|
-
return this.htmlId || `input-${(_a = getCurrentInstance()) === null || _a === void 0 ? void 0 : _a.uid}`;
|
|
96
|
-
},
|
|
97
|
-
hasValue() {
|
|
98
|
-
return !!this.localValue.length;
|
|
99
|
-
},
|
|
100
|
-
counterString() {
|
|
101
|
-
return this.maxLength && this.maxLength > 0 ? `${this.localValue.length} / ${this.maxLength}` : '';
|
|
102
|
-
},
|
|
103
|
-
isInactive() {
|
|
104
|
-
return this.isDisabled || this.isReadonly;
|
|
105
|
-
},
|
|
106
|
-
isShowError() {
|
|
107
|
-
return !!this.error && this.isInvalid;
|
|
108
|
-
},
|
|
109
|
-
isShowHint() {
|
|
110
|
-
return !!this.hint && !this.isShowError;
|
|
111
|
-
},
|
|
112
|
-
isShowInfo() {
|
|
113
|
-
return this.isShowError || this.isShowHint || !!this.maxLength;
|
|
114
|
-
},
|
|
115
|
-
rootClasses() {
|
|
116
|
-
return ['or-textbox', {
|
|
117
|
-
'is-show-info': this.isShowInfo,
|
|
118
|
-
'is-small': this.isSmall,
|
|
119
|
-
'has-counter': !!this.maxLength,
|
|
120
|
-
'has-label': !!this.label || !!this.$slots['label-default']
|
|
121
|
-
}];
|
|
122
|
-
},
|
|
123
|
-
inputClasses() {
|
|
124
|
-
return ['or-textbox--input-textarea', {
|
|
125
|
-
'is-disabled': this.isDisabled,
|
|
126
|
-
'is-readonly': this.isReadonly,
|
|
127
|
-
'is-focused': this.isFocused,
|
|
128
|
-
'is-required': this.isRequired,
|
|
129
|
-
'has-error': this.isInvalid
|
|
130
|
-
}];
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
methods: {
|
|
134
|
-
focus() {
|
|
135
|
-
var _a;
|
|
136
|
-
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
137
|
-
},
|
|
138
|
-
calcTextareaHeight() {
|
|
139
|
-
var _a;
|
|
140
|
-
if (this.inputRef) {
|
|
141
|
-
setStyle(this.inputRef, 'height', 0);
|
|
142
|
-
setStyle(this.inputRef, 'height', pxToRem((_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.scrollHeight));
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
onInput(event) {
|
|
146
|
-
if (this.isInactive) return;
|
|
147
|
-
this.calcTextareaHeight();
|
|
148
|
-
this.$emit('update:modelValue', event.target.value);
|
|
149
|
-
this.$emit('input', event.target.value);
|
|
150
|
-
},
|
|
151
|
-
onFocus(event) {
|
|
152
|
-
var _a;
|
|
153
|
-
this.isFocused = true;
|
|
154
|
-
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
155
|
-
this.$emit('focus', event);
|
|
156
|
-
},
|
|
157
|
-
onBlur(event) {
|
|
158
|
-
var _a;
|
|
159
|
-
this.isFocused = false;
|
|
160
|
-
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.blur();
|
|
161
|
-
this.$emit('blur', event);
|
|
162
|
-
},
|
|
163
|
-
beforeEnter(el) {
|
|
164
|
-
setStyle(el, 'opacity', 0);
|
|
165
|
-
},
|
|
166
|
-
enter(el) {
|
|
167
|
-
const {
|
|
168
|
-
scrollHeight,
|
|
169
|
-
parentElement
|
|
170
|
-
} = el;
|
|
171
|
-
this.reqAF = requestAF(() => {
|
|
172
|
-
const pt = parseFloat(getCS(parentElement).paddingTop);
|
|
173
|
-
const pb = parseFloat(getCS(parentElement).paddingBottom);
|
|
174
|
-
const height = scrollHeight + pt + pb;
|
|
175
|
-
if (parentElement) {
|
|
176
|
-
reflow(parentElement);
|
|
177
|
-
setStyle(parentElement, 'height', pxToRem(height));
|
|
178
|
-
}
|
|
179
|
-
setStyle(el, 'opacity', 1);
|
|
180
|
-
});
|
|
181
|
-
},
|
|
182
|
-
leave(el) {
|
|
183
|
-
this.reqAF = requestAF(() => {
|
|
184
|
-
el.style.opacity = '0';
|
|
185
|
-
});
|
|
186
|
-
},
|
|
187
|
-
cancelRequestAF() {
|
|
188
|
-
cancelAF(this.reqAF);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
|
|
193
|
-
var script$1 = defineComponent({
|
|
194
|
-
name: 'OrNumberInput',
|
|
195
|
-
components: {
|
|
196
|
-
OrInput: script$7
|
|
197
|
-
},
|
|
198
|
-
model: {
|
|
199
|
-
prop: 'modelValue',
|
|
200
|
-
event: 'update:modelValue'
|
|
201
|
-
},
|
|
202
|
-
props: {
|
|
203
|
-
modelValue: {
|
|
204
|
-
type: Number,
|
|
205
|
-
default: undefined,
|
|
206
|
-
required: false
|
|
207
|
-
},
|
|
208
|
-
htmlId: {
|
|
209
|
-
type: String,
|
|
210
|
-
default: '',
|
|
211
|
-
required: false
|
|
212
|
-
},
|
|
213
|
-
placeholder: {
|
|
214
|
-
type: String,
|
|
215
|
-
default: '',
|
|
216
|
-
required: false
|
|
217
|
-
},
|
|
218
|
-
label: {
|
|
219
|
-
type: String,
|
|
220
|
-
default: '',
|
|
221
|
-
required: false
|
|
222
|
-
},
|
|
223
|
-
error: {
|
|
224
|
-
type: String,
|
|
225
|
-
default: '',
|
|
226
|
-
required: false
|
|
227
|
-
},
|
|
228
|
-
hint: {
|
|
229
|
-
type: String,
|
|
230
|
-
default: '',
|
|
231
|
-
required: false
|
|
232
|
-
},
|
|
233
|
-
minValue: {
|
|
234
|
-
type: Number,
|
|
235
|
-
default: undefined,
|
|
236
|
-
required: false
|
|
237
|
-
},
|
|
238
|
-
maxValue: {
|
|
239
|
-
type: Number,
|
|
240
|
-
default: undefined,
|
|
241
|
-
required: false
|
|
242
|
-
},
|
|
243
|
-
stepValue: {
|
|
244
|
-
type: Number,
|
|
245
|
-
default: undefined,
|
|
246
|
-
required: false
|
|
247
|
-
},
|
|
248
|
-
isSmall: Boolean,
|
|
249
|
-
isRequired: Boolean,
|
|
250
|
-
isDisabled: Boolean,
|
|
251
|
-
isReadonly: Boolean,
|
|
252
|
-
isInvalid: Boolean
|
|
253
|
-
},
|
|
254
|
-
emits: ['focus', 'blur', 'update:modelValue', 'input', 'keypress', 'keyup', 'keydown'],
|
|
255
|
-
setup(props, {
|
|
256
|
-
emit
|
|
257
|
-
}) {
|
|
258
|
-
const inputRef = ref();
|
|
259
|
-
if (props.modelValue) {
|
|
260
|
-
if (props.minValue !== undefined && props.modelValue < props.minValue) {
|
|
261
|
-
emit('update:modelValue', props.minValue);
|
|
262
|
-
} else if (props.maxValue !== undefined && props.modelValue > props.maxValue) {
|
|
263
|
-
emit('update:modelValue', props.maxValue);
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
return {
|
|
267
|
-
inputRef
|
|
268
|
-
};
|
|
269
|
-
},
|
|
270
|
-
computed: {
|
|
271
|
-
htmlInputAttrs() {
|
|
272
|
-
return {
|
|
273
|
-
min: this.minValue,
|
|
274
|
-
max: this.maxValue,
|
|
275
|
-
step: this.stepValue
|
|
276
|
-
};
|
|
277
|
-
},
|
|
278
|
-
localValue: {
|
|
279
|
-
get() {
|
|
280
|
-
var _a;
|
|
281
|
-
return ((_a = this.modelValue) !== null && _a !== void 0 ? _a : '') + '';
|
|
282
|
-
},
|
|
283
|
-
set(val) {
|
|
284
|
-
if (val === undefined || val === '') {
|
|
285
|
-
this.$emit('update:modelValue', undefined);
|
|
286
|
-
return;
|
|
287
|
-
}
|
|
288
|
-
const numVal = +val;
|
|
289
|
-
if (this.minValue !== undefined && numVal < this.minValue) {
|
|
290
|
-
this.$emit('update:modelValue', this.minValue);
|
|
291
|
-
} else if (this.maxValue !== undefined && numVal > this.maxValue) {
|
|
292
|
-
this.$emit('update:modelValue', this.maxValue);
|
|
293
|
-
} else {
|
|
294
|
-
this.$emit('update:modelValue', numVal);
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
|
-
|
|
301
|
-
var script = defineComponent({
|
|
302
|
-
name: 'OrPassword',
|
|
303
|
-
components: {
|
|
304
|
-
OrInput: script$7,
|
|
305
|
-
OrIconButton: script$8
|
|
306
|
-
},
|
|
307
|
-
model: {
|
|
308
|
-
prop: 'modelValue',
|
|
309
|
-
event: 'update:modelValue'
|
|
310
|
-
},
|
|
311
|
-
props: {
|
|
312
|
-
modelValue: {
|
|
313
|
-
type: String,
|
|
314
|
-
default: '',
|
|
315
|
-
required: false
|
|
316
|
-
},
|
|
317
|
-
htmlId: {
|
|
318
|
-
type: String,
|
|
319
|
-
default: '',
|
|
320
|
-
required: false
|
|
321
|
-
},
|
|
322
|
-
placeholder: {
|
|
323
|
-
type: String,
|
|
324
|
-
default: '',
|
|
325
|
-
required: false
|
|
326
|
-
},
|
|
327
|
-
label: {
|
|
328
|
-
type: String,
|
|
329
|
-
default: '',
|
|
330
|
-
required: false
|
|
331
|
-
},
|
|
332
|
-
error: {
|
|
333
|
-
type: String,
|
|
334
|
-
default: '',
|
|
335
|
-
required: false
|
|
336
|
-
},
|
|
337
|
-
hint: {
|
|
338
|
-
type: String,
|
|
339
|
-
default: '',
|
|
340
|
-
required: false
|
|
341
|
-
},
|
|
342
|
-
maxLength: {
|
|
343
|
-
type: Number,
|
|
344
|
-
default: undefined,
|
|
345
|
-
required: false
|
|
346
|
-
},
|
|
347
|
-
isSmall: Boolean,
|
|
348
|
-
isRequired: Boolean,
|
|
349
|
-
isDisabled: Boolean,
|
|
350
|
-
isReadonly: Boolean,
|
|
351
|
-
isInvalid: Boolean
|
|
352
|
-
},
|
|
353
|
-
emits: ['focus', 'blur', 'update:modelValue', 'input', 'keypress', 'keyup', 'keydown'],
|
|
354
|
-
setup(props, {
|
|
355
|
-
emit
|
|
356
|
-
}) {
|
|
357
|
-
const inputRef = ref();
|
|
358
|
-
const localValue = useVModel(props, 'modelValue', emit);
|
|
359
|
-
const {
|
|
360
|
-
isActiveToggle,
|
|
361
|
-
toggle
|
|
362
|
-
} = useToggle();
|
|
363
|
-
return {
|
|
364
|
-
inputRef,
|
|
365
|
-
localValue,
|
|
366
|
-
isActiveToggle,
|
|
367
|
-
toggle
|
|
368
|
-
};
|
|
369
|
-
},
|
|
370
|
-
computed: {
|
|
371
|
-
currentButtonIcon() {
|
|
372
|
-
return this.isActiveToggle ? 'visibility' : 'visibility_off';
|
|
373
|
-
},
|
|
374
|
-
type() {
|
|
375
|
-
return this.isActiveToggle ? 'text' : 'password';
|
|
376
|
-
},
|
|
377
|
-
size() {
|
|
378
|
-
return this.isSmall ? BUTTON_SIZE.SMALL : BUTTON_SIZE.DEFAULT;
|
|
379
|
-
}
|
|
380
|
-
},
|
|
381
|
-
methods: {
|
|
382
|
-
onClick() {
|
|
383
|
-
var _a;
|
|
384
|
-
this.toggle();
|
|
385
|
-
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
});
|
|
389
|
-
|
|
390
|
-
export { script$1 as a, script as b, script$2 as s };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { default as OrTextarea } from './OrTextarea.vue';
|
|
2
|
-
export { default as OrInput } from './OrInput.vue';
|
|
3
|
-
export { default as OrNumberInput } from './OrNumberInput.vue';
|
|
4
|
-
export { default as OrPassword } from './OrPassword.vue';
|
|
5
|
-
export { default as OrSearch } from './OrSearch.vue';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { default as OrTextarea } from './OrTextarea.vue';
|
|
2
|
-
export { default as OrInput } from './OrInput.vue';
|
|
3
|
-
export { default as OrNumberInput } from './OrNumberInput.vue';
|
|
4
|
-
export { default as OrPassword } from './OrPassword.vue';
|
|
5
|
-
export { default as OrSearch } from './OrSearch.vue';
|