@stokelp/styled-system 2.73.0 → 2.74.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokelp/styled-system",
3
- "version": "2.73.0",
3
+ "version": "2.74.0",
4
4
  "description": "Stokelp UI styled-system",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -239,8 +239,8 @@
239
239
  "severity]___[value:none]___[recipe:button",
240
240
  "variant]___[value:primary]___[recipe:button",
241
241
  "variant]___[value:secondary]___[recipe:button",
242
- "size]___[value:md]___[recipe:button",
243
242
  "size]___[value:sm]___[recipe:button",
243
+ "size]___[value:md]___[recipe:button",
244
244
  "severity]___[value:danger]___[recipe:button",
245
245
  "severity]___[value:success]___[recipe:button"
246
246
  ],
@@ -319,12 +319,19 @@
319
319
  "colorScheme]___[value:error]___[recipe:tabsChip",
320
320
  "colorScheme]___[value:grey]___[recipe:tabsChip"
321
321
  ],
322
+ "chat": [],
322
323
  "datepicker": [],
323
324
  "formHelperText": [],
324
325
  "phoneNumberInput": [
325
326
  "size]___[value:md]___[recipe:phoneNumberInput"
326
327
  ],
327
328
  "buttonFilter": [],
329
+ "chatMessage": [
330
+ "side]___[value:left]___[recipe:chatMessage",
331
+ "variant]___[value:primary]___[recipe:chatMessage",
332
+ "side]___[value:right]___[recipe:chatMessage",
333
+ "variant]___[value:secondary]___[recipe:chatMessage"
334
+ ],
328
335
  "selectLanguage": [
329
336
  "variant]___[value:default]___[recipe:selectLanguage",
330
337
  "variant]___[value:compact]___[recipe:selectLanguage"
@@ -0,0 +1,39 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface ChatMessageVariant {
6
+ /**
7
+ * @default "left"
8
+ */
9
+ side: "left" | "right"
10
+ /**
11
+ * @default "primary"
12
+ */
13
+ variant: "primary" | "secondary"
14
+ }
15
+
16
+ type ChatMessageVariantMap = {
17
+ [key in keyof ChatMessageVariant]: Array<ChatMessageVariant[key]>
18
+ }
19
+
20
+ export type ChatMessageVariantProps = {
21
+ [key in keyof ChatMessageVariant]?: ConditionalValue<ChatMessageVariant[key]> | undefined
22
+ }
23
+
24
+ export interface ChatMessageRecipe {
25
+ __type: ChatMessageVariantProps
26
+ (props?: ChatMessageVariantProps): string
27
+ raw: (props?: ChatMessageVariantProps) => ChatMessageVariantProps
28
+ variantMap: ChatMessageVariantMap
29
+ variantKeys: Array<keyof ChatMessageVariant>
30
+ splitVariantProps<Props extends ChatMessageVariantProps>(props: Props): [ChatMessageVariantProps, Pretty<DistributiveOmit<Props, keyof ChatMessageVariantProps>>]
31
+ getVariantProps: (props?: ChatMessageVariantProps) => ChatMessageVariantProps
32
+ }
33
+
34
+ /**
35
+ * The styles for the Chat component
36
+
37
+
38
+ */
39
+ export declare const chatMessage: ChatMessageRecipe
@@ -0,0 +1,36 @@
1
+ import { memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe, mergeRecipes } from './create-recipe.mjs';
3
+
4
+ const chatMessageFn = /* @__PURE__ */ createRecipe('chat-message', {
5
+ "side": "left",
6
+ "variant": "primary"
7
+ }, [])
8
+
9
+ const chatMessageVariantMap = {
10
+ "side": [
11
+ "left",
12
+ "right"
13
+ ],
14
+ "variant": [
15
+ "primary",
16
+ "secondary"
17
+ ]
18
+ }
19
+
20
+ const chatMessageVariantKeys = Object.keys(chatMessageVariantMap)
21
+
22
+ export const chatMessage = /* @__PURE__ */ Object.assign(memo(chatMessageFn.recipeFn), {
23
+ __recipe__: true,
24
+ __name__: 'chatMessage',
25
+ __getCompoundVariantCss__: chatMessageFn.__getCompoundVariantCss__,
26
+ raw: (props) => props,
27
+ variantKeys: chatMessageVariantKeys,
28
+ variantMap: chatMessageVariantMap,
29
+ merge(recipe) {
30
+ return mergeRecipes(this, recipe)
31
+ },
32
+ splitVariantProps(props) {
33
+ return splitProps(props, chatMessageVariantKeys)
34
+ },
35
+ getVariantProps: chatMessageFn.getVariantProps,
36
+ })
@@ -0,0 +1,32 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface ChatVariant {
6
+
7
+ }
8
+
9
+ type ChatVariantMap = {
10
+ [key in keyof ChatVariant]: Array<ChatVariant[key]>
11
+ }
12
+
13
+ export type ChatVariantProps = {
14
+ [key in keyof ChatVariant]?: ConditionalValue<ChatVariant[key]> | undefined
15
+ }
16
+
17
+ export interface ChatRecipe {
18
+ __type: ChatVariantProps
19
+ (props?: ChatVariantProps): Pretty<Record<"root" | "message-container" | "message", string>>
20
+ raw: (props?: ChatVariantProps) => ChatVariantProps
21
+ variantMap: ChatVariantMap
22
+ variantKeys: Array<keyof ChatVariant>
23
+ splitVariantProps<Props extends ChatVariantProps>(props: Props): [ChatVariantProps, Pretty<DistributiveOmit<Props, keyof ChatVariantProps>>]
24
+ getVariantProps: (props?: ChatVariantProps) => ChatVariantProps
25
+ }
26
+
27
+ /**
28
+ * The styles for the Chat component
29
+
30
+
31
+ */
32
+ export declare const chat: ChatRecipe
@@ -0,0 +1,40 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe } from './create-recipe.mjs';
3
+
4
+ const chatDefaultVariants = {}
5
+ const chatCompoundVariants = []
6
+
7
+ const chatSlotNames = [
8
+ [
9
+ "root",
10
+ "chat__root"
11
+ ],
12
+ [
13
+ "message-container",
14
+ "chat__message-container"
15
+ ],
16
+ [
17
+ "message",
18
+ "chat__message"
19
+ ]
20
+ ]
21
+ const chatSlotFns = /* @__PURE__ */ chatSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, chatDefaultVariants, getSlotCompoundVariant(chatCompoundVariants, slotName))])
22
+
23
+ const chatFn = memo((props = {}) => {
24
+ return Object.fromEntries(chatSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
25
+ })
26
+
27
+ const chatVariantKeys = []
28
+ const getVariantProps = (variants) => ({ ...chatDefaultVariants, ...compact(variants) })
29
+
30
+ export const chat = /* @__PURE__ */ Object.assign(chatFn, {
31
+ __recipe__: false,
32
+ __name__: 'chat',
33
+ raw: (props) => props,
34
+ variantKeys: chatVariantKeys,
35
+ variantMap: {},
36
+ splitVariantProps(props) {
37
+ return splitProps(props, chatVariantKeys)
38
+ },
39
+ getVariantProps
40
+ })
@@ -21,6 +21,7 @@ export * from './flag';
21
21
  export * from './avatar-group';
22
22
  export * from './tabs-chip';
23
23
  export * from './checkbox-group';
24
+ export * from './chat-message';
24
25
  export * from './drawer';
25
26
  export * from './radio-button-group';
26
27
  export * from './radio-group';
@@ -52,4 +53,5 @@ export * from './dialog';
52
53
  export * from './app-navigation-language-select';
53
54
  export * from './avatar';
54
55
  export * from './menu';
55
- export * from './price-tag';
56
+ export * from './price-tag';
57
+ export * from './chat';
package/recipes/index.mjs CHANGED
@@ -20,6 +20,7 @@ export * from './flag.mjs';
20
20
  export * from './avatar-group.mjs';
21
21
  export * from './tabs-chip.mjs';
22
22
  export * from './checkbox-group.mjs';
23
+ export * from './chat-message.mjs';
23
24
  export * from './drawer.mjs';
24
25
  export * from './radio-button-group.mjs';
25
26
  export * from './radio-group.mjs';
@@ -51,4 +52,5 @@ export * from './dialog.mjs';
51
52
  export * from './app-navigation-language-select.mjs';
52
53
  export * from './avatar.mjs';
53
54
  export * from './menu.mjs';
54
- export * from './price-tag.mjs';
55
+ export * from './price-tag.mjs';
56
+ export * from './chat.mjs';