playbook_ui 13.8.0 → 13.9.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d2eca7c20f8832218f6db41d2723db43b2350e59a7aad8334da3931c3c0bbb1a
4
- data.tar.gz: ebc310683144bfef85d081ceb97d118a34974f77e172999fdbb448abaf30291b
3
+ metadata.gz: 3913dffced512fb212f3b0a4e1037abbf10a28420af5f13f666b62ac4b4a385d
4
+ data.tar.gz: c254328bfcb08db335a4c1a376cfbd83fc7f9eb981749a2041f6fd0394ab3a36
5
5
  SHA512:
6
- metadata.gz: bf3e81b0e87cdb87c08ccff73734d1f1f29eb854d1472fcbef22a366529a6a8c94c4fd0951d4d21f053b1114e84bad839bc90a062c30a15caa3c70f98185da1b
7
- data.tar.gz: 160a1bcfea2ba6353e6d0469fb9884deb3d28628063fad41bb7e1a2c5e92bac0d7ee45e4e78ab27e14b4b6e5bd584cba1ff3134e74b444064624b25533a5c73b
6
+ metadata.gz: 76ad54d6d06215fcc8ed33cf0186f8c6b23d850b21a2f58e99f5761a8eb33dfb9a8e7280692962134b53a0cb475663eba34fe7029394cdfa9e56b6ea905ddf6c
7
+ data.tar.gz: e897dae13452e396a6efda42c0d2ddeee117413c7bb9c9778fd781a024302c7946f420631c1cd9d01181ed132dc419a949356cc5a9541b6cc540583f4566134b
@@ -2,6 +2,7 @@ import React from 'react'
2
2
  import classnames from 'classnames'
3
3
  import { buildAriaProps, buildDataProps } from '../utilities/props'
4
4
  import { GlobalProps, globalProps } from '../utilities/globalProps'
5
+ import { isValidEmoji } from '../utilities/validEmojiChecker'
5
6
 
6
7
  import Icon from '../pb_icon/_icon'
7
8
  import Caption from "../pb_caption/_caption"
@@ -38,12 +39,6 @@ type ButtonPropTypes = {
38
39
  wrapperClass?: string,
39
40
  } & GlobalProps
40
41
 
41
- const isValidEmoji = (emoji: string) => {
42
- // Using regular expression to check if the string is a valid emoji/emoji Unicode
43
- const emojiRegex = /^(\p{Emoji}|\uFE0F)+$/u;
44
- return emojiRegex.test(emoji);
45
- };
46
-
47
42
  const buttonClassName = (props: ButtonPropTypes) => {
48
43
  const {
49
44
  disabled = false,
@@ -1,5 +1,5 @@
1
1
  <%= pb_rails("button", props: { count: 153, highlight: false, icon: "&#127881;", classname: "count", id: "reaction-button-highlight", variant: "reaction" }) %>
2
- <%= pb_rails("button", props: { count: 5, icon: "😍", variant: "reaction", margin_left: "lg" }) %>
2
+ <%= pb_rails("button", props: { count: 5, icon: "1️⃣", variant: "reaction", margin_left: "lg" }) %>
3
3
  <%= pb_rails("button", props: { variant: "reaction", margin_left: "lg" }) %>
4
4
  <%= pb_rails("button", props: { icon: "user", variant: "reaction", margin_left: "lg" }) %>
5
5
 
@@ -19,7 +19,7 @@ return (
19
19
  />
20
20
  <Button
21
21
  count={5}
22
- icon="😍"
22
+ icon="1️⃣"
23
23
  marginLeft='lg'
24
24
  tabIndex={0}
25
25
  variant="reaction"
@@ -2,6 +2,7 @@ import React from 'react'
2
2
  import classnames from 'classnames'
3
3
  import { buildAriaProps, buildDataProps } from '../utilities/props'
4
4
  import { GlobalProps, globalProps } from '../utilities/globalProps'
5
+ import { isValidEmoji } from '../utilities/validEmojiChecker'
5
6
 
6
7
  export type IconSizes = "lg"
7
8
  | "xs"
@@ -104,13 +105,6 @@ const Icon = (props: IconProps) => {
104
105
  const ariaProps: {[key: string]: any} = buildAriaProps(aria)
105
106
  const dataProps: {[key: string]: any} = buildDataProps(data)
106
107
 
107
- const isValidEmoji = (emoji: string) => {
108
- // Using regular expression to check if the string is a valid emoji/emoji Unicode
109
- const emojiRegex = /^(\p{Emoji}|\uFE0F)+$/u;
110
- return emojiRegex.test(emoji);
111
- };
112
-
113
-
114
108
  // Add a conditional here to show only the SVG if custom
115
109
  const displaySVG = (customIcon: any) => {
116
110
  if (customIcon)
@@ -6,6 +6,7 @@
6
6
 
7
7
  .content_wrapper {
8
8
  width: 100%;
9
+ font-size: $font_base - 1;
9
10
 
10
11
  .pull-left {
11
12
  margin-left: $space-xs;
@@ -0,0 +1,6 @@
1
+ export const isValidEmoji = (emoji: string) => {
2
+ // Using regular expression to check if the string is a valid emoji/emoji Unicode
3
+ const emojiRegex = /^(\p{Emoji}|\uFE0F|\u200D|\u20E3)+$/u;
4
+ return emojiRegex.test(emoji);
5
+ };
6
+