Skip to content

Commit

Permalink
Style(repo): Replace unicode "heavy check mark" with "check mark"
Browse files Browse the repository at this point in the history
  * we have previously used "heavy check mark" unicode character
    that is not recognized by the Prettier v3
  * @see: https://www.compart.com/en/unicode/U+2714
  * this unicode character is replaced by "check mark" that is lighter
    and Prettier to not have problem with it
  * @see: https://www.compart.com/en/unicode/U+2713
  * it is also more convenient to use the same size of the character
    because as oposite to the "check mark" we are using "multiplication"
  * @see: https://www.compart.com/en/unicode/U+2715
  * @see: prettier/prettier#15572 for more
    details about the Prettier problem with thiunicode character
  • Loading branch information
literat committed Jun 10, 2024
1 parent a7f1361 commit 32f2d76
Show file tree
Hide file tree
Showing 52 changed files with 141 additions and 141 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ This project uses Prettier for code formatting. You can run `make format` to for
- `Name` — the name of the prop, e.g. `title`
- `Type` — the type of the prop, e.g. `string`, `number`, `bool`, `[horizontal | vertical]`, an existing [dictionary], etc.
- `Default` — the default value of the prop, e.g. `null` or `` (em-dash) if there is no default value
- `Required` — if the prop is required `` or not ``
- `Required` — if the prop is required `` or not ``
- `Description` — the description of the prop, e.g. `Title of the accordion`
3. The props MUST be sorted alphabetically by their name.

Expand Down
16 changes: 8 additions & 8 deletions packages/form-validations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ _Constructor_

| Parameter | Default | Required | Description |
| --------- | ---------------------------- | -------- | --------------------------------------------------- |
| form || | The form element |
| form || | The form element |
| config | [See above](#default-config) || The config object |
| live | `true` || Whether FormValidations should validate as you type |

Expand Down Expand Up @@ -207,16 +207,16 @@ _Set the current locale globally_

| Parameter | Default | Required | Description |
| --------- | ------- | -------- | -------------------------------------------------------------------------------------- |
| `locale` || | Error messages on new FormValidations forms will be displayed according to this locale |
| `locale` || | Error messages on new FormValidations forms will be displayed according to this locale |

**FormValidations.addMessages(locale, messages)**

_Set the current locale globally_

| Parameter | Default | Required | Description |
| ---------- | ------- | -------- | ------------------------------------------------------------------- |
| `locale` || | The corresponding locale |
| `messages` || | Object containing validator names as keys and error texts as values |
| `locale` || | The corresponding locale |
| `messages` || | Object containing validator names as keys and error texts as values |

### Custom validators

Expand All @@ -226,19 +226,19 @@ _Add a custom validator_

| Parameter | Default | Required | Description |
| ------------------- | ------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `element` || | The dom element where validator is applied to. |
| `element` || | The dom element where validator is applied to. |
| `halt` | `false` || Whether to stop validation of the field after this validator is applied on the field. When `true`, after this validator finishes validating, the rest of the validators are ignored on the current field. |
| `message` || | The message to show when the validation fails. It supports simple templating. `${0}` for the input's value, `${1}` and so on are for the attribute values. For the above example, `${0}` will get replaced by `myValue`, `${1}` by `10`, `${2}` by `20`, `${3}` by `dhaka`. It can also be a function which should return the error string. The values and inputs are available as function arguments |
| `message` || | The message to show when the validation fails. It supports simple templating. `${0}` for the input's value, `${1}` and so on are for the attribute values. For the above example, `${0}` will get replaced by `myValue`, `${1}` by `10`, `${2}` by `20`, `${3}` by `dhaka`. It can also be a function which should return the error string. The values and inputs are available as function arguments |
| `priority` | 1 || Priority of the validator function. The higher the value, the earlier it gets called when there are multiple validators on one field. |
| `validatorCallback` || | The function that validates the field. The value of the input field gets passed as the first parameter, and the attribute value (split using a comma) as the subsequent parameters. For example, for `<input data-spirit-my-validator="10,20,dhaka" value="myValue"/>`, the validator function gets called like `validatorCallback("myValue", 10, 20, "dhaka")`. Inside the function `this` refers to the input element |
| `validatorCallback` || | The function that validates the field. The value of the input field gets passed as the first parameter, and the attribute value (split using a comma) as the subsequent parameters. For example, for `<input data-spirit-my-validator="10,20,dhaka" value="myValue"/>`, the validator function gets called like `validatorCallback("myValue", 10, 20, "dhaka")`. Inside the function `this` refers to the input element |

**FormValidations.addValidator(name, fn, message, priority, halt)**

_Add a global custom validator_

| Parameter | Default | Required | Description |
| --------- | ------- | -------- | --------------------------------------------------------------------------------------------------------------------------- |
| `name` || | A string, the name of the validator, you can then use `data-spirit-<NAME>` attribute in form fields to apply this validator |
| `name` || | A string, the name of the validator, you can then use `data-spirit-<NAME>` attribute in form fields to apply this validator |
| `....` ||| Other parameters same as above |

### Resetting
Expand Down
12 changes: 6 additions & 6 deletions packages/web-react/src/components/Accordion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ import { AccordionOpenStateType } from '@lmc-eu/spirit-web-react/types';

| Name | Type | Default | Required | Description |
| ------------- | --------------------------------- | --------- | -------- | ------------------------------------------------ |
| `children` | `ReactNode` || | Accordion children's nodes |
| `children` | `ReactNode` || | Accordion children's nodes |
| `elementType` | [`section` \| `article` \| `div`] | `section` || Type of element used as wrapper |
| `open` | [`string` \| `string[]`] ||| Open item or list of open items \* |
| `toggle` | `(id: string) => void` ||| A generic handler for a single **AccordionItem** |
Expand All @@ -153,7 +153,7 @@ and [escape hatches][readme-escape-hatches].

| Name | Type | Default | Required | Description |
| ------------- | --------------------------------- | --------- | -------- | ---------------------------------------------- |
| `children` | `ReactNode` || | Accordion children's nodes |
| `children` | `ReactNode` || | Accordion children's nodes |
| `defaultOpen` | [`string` \| `string[]`] ||| Default open item(s) \* |
| `elementType` | [`section` \| `article` \| `div`] | `section` || Type of element used as wrapper |
| `stayOpen` | `bool` ||| Item stay open when another one is also opened |
Expand All @@ -168,9 +168,9 @@ and [escape hatches][readme-escape-hatches].

| Name | Type | Default | Required | Description |
| ------------- | --------------------------------- | --------- | -------- | ----------------------------------------------- |
| `children` | `ReactNode` || | Item children node |
| `children` | `ReactNode` || | Item children node |
| `elementType` | [`article` \| `section` \| `div`] | `article` || Type of element used as wrapper for single item |
| `id` | `string` || | Item id |
| `id` | `string` || | Item id |

On top of the API options, the components accept [additional attributes][readme-additional-attributes].
If you need more control over the styling of a component, you can use [style props][readme-style-props]
Expand All @@ -180,7 +180,7 @@ and [escape hatches][readme-escape-hatches].

| Name | Type | Default | Required | Description |
| ------------- | ------------- | ------- | -------- | ----------------------- |
| `children` | `ReactNode` || | Header children node |
| `children` | `ReactNode` || | Header children node |
| `elementType` | `ElementType` | `h3` || Type of element |
| `slot` | `ReactNode` ||| Side slot in the header |

Expand All @@ -192,7 +192,7 @@ and [escape hatches][readme-escape-hatches].

| Name | Type | Default | Required | Description |
| ---------- | ----------- | ------- | -------- | --------------------- |
| `children` | `ReactNode` || | Content children node |
| `children` | `ReactNode` || | Content children node |

On top of the API options, the components accept [additional attributes][readme-additional-attributes].
If you need more control over the styling of a component, you can use [style props][readme-style-props]
Expand Down
2 changes: 1 addition & 1 deletion packages/web-react/src/components/Alert/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { Alert } from '@lmc-eu/spirit-web-react/components';

| Name | Type | Default | Required | Description |
| -------------- | -------------------------------------------- | --------- | -------- | -------------------------- |
| `children` | `ReactNode` || | Content of the Alert |
| `children` | `ReactNode` || | Content of the Alert |
| `color` | [Emotion Color dictionary][dictionary-color] | `success` || Color of the component |
| `iconName` | `string` | `info` \* || Icon used in Alert |
| `isCentered` . | `bool` | `false` || If true, Alert is centered |
Expand Down
2 changes: 1 addition & 1 deletion packages/web-react/src/components/ButtonLink/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { ButtonLink } from '@lmc-eu/spirit-web-react';
| `children` | `ReactNode` | `null` || Content of the ButtonLink |
| `color` | [Action Color dictionary][dictionary-color], [Emotion Color dictionary][dictionary-color] | `primary` || Color variant |
| `elementType` | `ElementType` | `a` || Type of element |
| `href` | `string` || | Link URL |
| `href` | `string` || | Link URL |
| `isBlock` | `bool` | `false` || Span the element to the full width of its parent |
| `isDisabled` | `bool` | `false` || If true, ButtonLink is disabled |
| `isLoading` | `bool` | `false` || If true, ButtonLink is in a loading state, disabled and the Spinner is visible |
Expand Down
2 changes: 1 addition & 1 deletion packages/web-react/src/components/Checkbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Advanced example usage:
| ----------------- | ---------------------------------------------- | ------- | -------- | ---------------------------------------------------- |
| `autoComplete` | `string` | - || [Automated assistance in filling][autocomplete-attr] |
| `helperText` | `string` ||| Custom helper text |
| `id` | `string` | - | | Input and label identification |
| `id` | `string` | - | | Input and label identification |
| `isDisabled` | `boolean` | - || Whether is field disabled |
| `isChecked` | `boolean` | - || Whether is field checked |
| `isItem` | `boolean` | - || To render in [Item][item] mode |
Expand Down
4 changes: 2 additions & 2 deletions packages/web-react/src/components/Collapse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const [isOpen, toggle] = useState<boolean>(true);
| ------------------------- | ----------------------------------- | ------- | -------- | ------------------------------------------- |
| `collapsibleToBreakpoint` | [`mobile` \| `tablet` \| `desktop`] ||| Handle for responsive breakpoint |
| `elementType` | [`span` \| `div`] | `div` || Type of element used as wrapper and content |
| `id` | `string` || | Component id |
| `id` | `string` || | Component id |
| `isOpen` | `bool` ||| Is open on initialization |
| `transitionDuration` | `number` | `250` || Transition duration in miliseconds |

Expand Down Expand Up @@ -131,7 +131,7 @@ import { Button, UncontrolledCollapse } from '@lmc-eu/spirit-web-react/component
| ------------------------- | -------------------------------------------- | ------- | -------- | ------------------------------------------- |
| `collapsibleToBreakpoint` | [`mobile` \| `tablet` \| `desktop`] ||| Handle for responsive breakpoint |
| `elementType` | [`span` \| `div`] | `div` || Type of element used as wrapper and content |
| `id` | `string` || | Component id |
| `id` | `string` || | Component id |
| `isOpen` | `bool` ||| Is open on initialization |
| `hideOnCollapse` | `bool` ||| Hides button when content is displayed |
| `renderTrigger` | `(render: CollapseRenderProps) => ReactNode` ||| Properties for trigger render |
Expand Down
Loading

0 comments on commit 32f2d76

Please sign in to comment.