@eldrajs/ui 0.3.7 → 0.3.9
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/CHANGELOG.md +6 -0
- package/LICENSE-country-flag-icons +25 -0
- package/README.md +274 -66
- package/dist/CountryFlag-DOa8lOHp.js +71 -0
- package/dist/PhoneInput-CX83wgD0.js +695 -0
- package/dist/{VariantPicker-Cr_AkX47.js → VariantPicker-BqLbiONX.js} +122 -2302
- package/dist/components/chip/Chip.vue.d.ts +9 -0
- package/dist/components/dialog/Dialog.vue.d.ts +9 -0
- package/dist/components/drawer/Drawer.vue.d.ts +9 -0
- package/dist/components/filter-panel/FilterGroup.vue.d.ts +9 -0
- package/dist/components/filter-panel/FilterPanel.vue.d.ts +9 -0
- package/dist/components/filter-panel/facets/ColourFacet.vue.d.ts +9 -0
- package/dist/components/filter-panel/facets/ListFacet.vue.d.ts +9 -0
- package/dist/components/filter-panel/facets/RangeFacet.vue.d.ts +9 -0
- package/dist/components/filter-panel/facets/SizeFacet.vue.d.ts +9 -0
- package/dist/components/filter-panel/facets/ToggleFacet.vue.d.ts +9 -0
- package/dist/components/lightbox/Lightbox.vue.d.ts +9 -0
- package/dist/components/nav-menu/NavMenu.vue.d.ts +9 -0
- package/dist/components/pagination/Pagination.vue.d.ts +9 -0
- package/dist/components/range-slider/RangeSlider.vue.d.ts +9 -0
- package/dist/components/search-bar/SearchBar.vue.d.ts +9 -0
- package/dist/components/search-modal/SearchModal.vue.d.ts +9 -0
- package/dist/components/select/MultiSelect.vue.d.ts +10 -0
- package/dist/components/select/Select.vue.d.ts +9 -0
- package/dist/components/select/types.d.ts +7 -1
- package/dist/components/site-form/SiteForm.vue.d.ts +9 -0
- package/dist/components/toast/Toast.vue.d.ts +9 -0
- package/dist/components/toast/Toaster.vue.d.ts +9 -0
- package/dist/components.css +64 -0
- package/dist/flag/CountryFlag.vue.d.ts +9 -0
- package/dist/flag/flags.d.ts +8 -0
- package/dist/flag/index.d.ts +9 -0
- package/dist/flag.js +1 -0
- package/dist/index.js +4 -2
- package/dist/messages/en-US.d.ts +21 -0
- package/dist/messages/is-IS.js +10 -1
- package/dist/phone/PhoneInput.vue.d.ts +221 -0
- package/dist/phone/caret.d.ts +14 -0
- package/dist/phone/examples.d.ts +2 -0
- package/dist/phone/index.d.ts +13 -0
- package/dist/phone/phone.d.ts +62 -0
- package/dist/phone/phoneFlagData.d.ts +2 -0
- package/dist/phone/rule.d.ts +22 -0
- package/dist/phone/types.d.ts +63 -0
- package/dist/phone/vee-validate/FieldPhoneInput.vue.d.ts +24 -0
- package/dist/phone/vee-validate/index.d.ts +3 -0
- package/dist/phone/vee-validate/types.d.ts +3 -0
- package/dist/phone/vee-validate.js +96 -0
- package/dist/phone.js +3 -0
- package/dist/phoneFlagData-D9dDT2uC.js +261 -0
- package/dist/resolver.d.ts +15 -2
- package/dist/resolver.js +26 -4
- package/dist/style.css +64 -0
- package/dist/useEldraScope-BDbGzt7R.js +32 -0
- package/dist/useFieldControl-D1j54YON.js +273 -0
- package/dist/{useMessages-DOHGfip_.js → useMessages-CkhrRmu7.js} +22 -1
- package/dist/usePopover-ECHpsSRF.js +2199 -0
- package/dist/utilities.css +37 -0
- package/dist/vee-validate.js +7 -273
- package/dist/vue-i18n.js +4 -1
- package/package.json +23 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ Release-please writes the generated notes from commit messages and does not repl
|
|
|
7
7
|
|
|
8
8
|
### Added
|
|
9
9
|
|
|
10
|
+
- **`MultiSelect` `selectAll`** adds a "Select all" button to the footer, before Clear. It adds every enabled option the list is showing to the selection, so with a search typed it selects the matches only, and it is disabled once they are all selected. New part `footerSelectAll` and message `selectAll` ("Select all" / "Velja allt"). On by default: an existing `MultiSelect` gains the button; `:select-all="false"` leaves it out.
|
|
11
|
+
- **`@eldrajs/ui/flag`** — `CountryFlag`, the flag `PhoneInput` draws, for use on its own: `<CountryFlag country="NO" />` beside a country's name in a select, an address or a language switch (decorative), or with `label` as a named image. No peer dependency. The artwork is the same lazy chunk `@eldrajs/ui/phone` loads, fetched when the first flag mounts; `preloadCountryFlags()` fetches it sooner. `<EldraCountryFlag>` resolves from this entry (`flagComponentNames` in `@eldrajs/ui/resolver`). `preloadPhoneFlags` stays in `@eldrajs/ui/phone`, as the same function.
|
|
12
|
+
- **`@eldrajs/ui/phone`** — `PhoneInput`, a phone number field with its country inside it: a country button (flag, dialling code) that opens a searchable country list under the field (`preferredCountries` first, then A to Z; found by name, dialling code or ISO code), and a number spaced the way the country writes it as it is typed, with the caret kept in place. `modelValue` is the number in E.164; `v-model:country`, `defaultCountry`, `countries`, `locale`, `size`, `name` (posts the E.164 value), `placeholder` (an example number by default), a `flag` slot and a `change` event (`{ e164, country, callingCode, nationalNumber, valid }`). Typing or pasting a number that starts with `+` picks the country. Also exported: `isValidPhone`, `parsePhone`, `phoneRule`, `phoneCountries`, `phoneCallingCode`, `phoneCountryName`, `phoneExample`, `preloadPhoneFlags`. `libphonenumber-js ^1.13` is a new optional peer, imported by this entry only; the flags (country-flag-icons, MIT) are one lazy chunk. `<EldraPhoneInput>` through the resolver, from `@eldrajs/ui/phone` (`phoneComponentNames`).
|
|
13
|
+
- **`@eldrajs/ui/phone/vee-validate`** — `FieldPhoneInput`, `PhoneInput` bound to a vee-validate field with the typed-control validation defaults; with no `rules` it checks the number against the country the field is on. `phoneRule({ country, locale, messages })` returns `true` or a message naming the country.
|
|
14
|
+
- **Messages** `phoneCountry`, `phoneCountryList`, `phoneSearch`, `phoneSuggested`, `phoneAllCountries`, `phoneNoMatch`, `phoneInvalid` and `phoneInvalidNumber`, in English and Icelandic and through `@eldrajs/ui/vue-i18n`.
|
|
15
|
+
- **`eldra-focus-has-open`** in `utilities.css`: turns an element's `eldra-focus` ring on while a descendant has `aria-expanded="true"`, for a box whose popup opens from a button inside it.
|
|
10
16
|
- **`validateOnMount`, `validateOnBlur` and `validateOnValueUpdate` on every `Field*`**, deciding per field when it validates: on mount (default `false`; the message is shown at once), on blur (default `true`), and on every value change once touched or submitted (default `false` for a typed control, `true` for a choice control). A submit always validates every field. They hold with `rules` on the field and with a `validationSchema` on the `Form` alike. `FIELD_VALIDATION_DEFAULTS`, `FIELD_CHOICE_VALIDATION_DEFAULTS` and `FIELD_VALIDATION_PROPS` are exported from `@eldrajs/ui/vee-validate`, and `FIELD_ONLY` now includes the three names.
|
|
11
17
|
- **`Notice`** — an inline message that stays in the page flow: `tone` (`info`, `success`, `warning`, `danger`; `data-tone` on the root), `title`, `text` / default slot, a default icon per tone (`icon` replaces it, `null` removes it), `headingLevel`, an `actions` slot and `classes`. `role="status"` for `info`, `success` and `warning`, `role="alert"` for `danger`; `announce: false` drops the role. New types `NoticeProps`, `NoticePart`, `NoticeTone`; `<EldraNotice>` through the resolver.
|
|
12
18
|
- **`StepIndicator`** — a non-interactive ordered list of steps: `steps` (`{ label, description? }`), `current` (index from 0), `orientation` (`horizontal`, `vertical`) and `classes`. `aria-current="step"` on the current step, "(completed)" / "(not started)" in visually hidden text on the others. New messages `stepCompleted`, `stepNotStarted`; new types `StepIndicatorProps`, `StepIndicatorStep`, `StepIndicatorOrientation`, `StepIndicatorState`, `StepIndicatorPart`; `<EldraStepIndicator>` through the resolver.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
The country flags drawn by CountryFlag and PhoneInput (dist/phoneFlagData-*.js) are copied from
|
|
2
|
+
country-flag-icons 1.6.20 (https://gitlab.com/catamphetamine/country-flag-icons), under:
|
|
3
|
+
|
|
4
|
+
(The MIT License)
|
|
5
|
+
|
|
6
|
+
Copyright (c) 2020 @catamphetamine <purecatamphetamine@gmail.com>
|
|
7
|
+
|
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
9
|
+
a copy of this software and associated documentation files (the
|
|
10
|
+
'Software'), to deal in the Software without restriction, including
|
|
11
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
12
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
13
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
14
|
+
the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be
|
|
17
|
+
included in all copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
20
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
21
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
22
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
23
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
24
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
25
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|