@serendie/ui 0.1.13 → 0.1.14

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.
Files changed (31) hide show
  1. package/dist/components/AccordionGroup.d.ts +1 -1
  2. package/dist/components/DropdownMenu.js +67 -55
  3. package/dist/components/IconButton.d.ts +35 -5
  4. package/dist/components/Search.js +44 -29
  5. package/dist/components/Select.d.ts +3 -1
  6. package/dist/components/Select.js +29 -19
  7. package/dist/components/TextArea.js +5 -4
  8. package/dist/preset.d.ts +1 -1
  9. package/dist/styles.css +1 -1
  10. package/dist/ui/styled-system/css/conditions.js +13 -13
  11. package/dist/ui/styled-system/helpers.js +104 -101
  12. package/dist/ui/styled-system/jsx/is-valid-prop.js +1 -1
  13. package/package.json +2 -2
  14. package/styled-system/css/conditions.js +4 -2
  15. package/styled-system/helpers.js +15 -5
  16. package/styled-system/jsx/is-valid-prop.js +2 -2
  17. package/styled-system/themes/index.js +1 -1
  18. package/styled-system/tokens/tokens.d.ts +1 -1
  19. package/styled-system/types/composition.d.ts +26 -0
  20. package/styled-system/types/conditions.d.ts +35 -3
  21. package/styled-system/types/global.d.ts +1 -0
  22. package/styled-system/types/jsx.d.ts +1 -1
  23. package/styled-system/types/prop-type.d.ts +3 -8
  24. package/styled-system/types/selectors.d.ts +1 -1
  25. package/styled-system/types/static-css.d.ts +9 -4
  26. package/styled-system/types/style-props.d.ts +229 -205
  27. package/styled-system/types/system-types.d.ts +108 -3
  28. /package/styled-system/themes/{asagi.json → theme-asagi.json} +0 -0
  29. /package/styled-system/themes/{kurikawa.json → theme-kurikawa.json} +0 -0
  30. /package/styled-system/themes/{sumire.json → theme-sumire.json} +0 -0
  31. /package/styled-system/themes/{tsutsuji.json → theme-tsutsuji.json} +0 -0
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable */
2
2
  import type { ConditionalValue, Nested } from './conditions';
3
- import type { PropertiesFallback } from './csstype';
3
+ import type { AtRule, Globals, PropertiesFallback } from './csstype';
4
4
  import type { SystemProperties, CssVarProperties } from './style-props';
5
5
 
6
6
  type String = string & {}
@@ -22,9 +22,93 @@ export type Assign<T, U> = {
22
22
  * Native css properties
23
23
  * -----------------------------------------------------------------------------*/
24
24
 
25
+ type DashedIdent = `--${string}`
26
+
27
+ type StringToMultiple<T extends string> = T | `${T}, ${T}`
28
+
29
+ export type PositionAreaAxis =
30
+ | 'left'
31
+ | 'center'
32
+ | 'right'
33
+ | 'x-start'
34
+ | 'x-end'
35
+ | 'span-x-start'
36
+ | 'span-x-end'
37
+ | 'x-self-start'
38
+ | 'x-self-end'
39
+ | 'span-x-self-start'
40
+ | 'span-x-self-end'
41
+ | 'span-all'
42
+ | 'top'
43
+ | 'bottom'
44
+ | 'span-top'
45
+ | 'span-bottom'
46
+ | 'y-start'
47
+ | 'y-end'
48
+ | 'span-y-start'
49
+ | 'span-y-end'
50
+ | 'y-self-start'
51
+ | 'y-self-end'
52
+ | 'span-y-self-start'
53
+ | 'span-y-self-end'
54
+ | 'block-start'
55
+ | 'block-end'
56
+ | 'span-block-start'
57
+ | 'span-block-end'
58
+ | 'inline-start'
59
+ | 'inline-end'
60
+ | 'span-inline-start'
61
+ | 'span-inline-end'
62
+ | 'self-block-start'
63
+ | 'self-block-end'
64
+ | 'span-self-block-start'
65
+ | 'span-self-block-end'
66
+ | 'self-inline-start'
67
+ | 'self-inline-end'
68
+ | 'span-self-inline-start'
69
+ | 'span-self-inline-end'
70
+ | 'start'
71
+ | 'end'
72
+ | 'span-start'
73
+ | 'span-end'
74
+ | 'self-start'
75
+ | 'self-end'
76
+ | 'span-self-start'
77
+ | 'span-self-end'
78
+
79
+ type PositionTry =
80
+ | 'normal'
81
+ | 'flip-block'
82
+ | 'flip-inline'
83
+ | 'top'
84
+ | 'bottom'
85
+ | 'left'
86
+ | 'right'
87
+ | 'block-start'
88
+ | 'block-end'
89
+ | 'inline-start'
90
+ | 'inline-end'
91
+ | DashedIdent
92
+
93
+ export interface ModernCssProperties {
94
+ anchorName?: Globals | 'none' | DashedIdent | StringToMultiple<DashedIdent>
95
+ anchorScope?: Globals | 'none' | 'all' | DashedIdent | StringToMultiple<DashedIdent>
96
+ fieldSizing?: Globals | 'fixed' | 'content'
97
+ interpolateSize?: Globals | 'allow-keywords' | 'numeric-only'
98
+ positionAnchor?: Globals | 'auto' | DashedIdent
99
+ positionArea?: Globals | 'auto' | PositionAreaAxis | `${PositionAreaAxis} ${PositionAreaAxis}` | String
100
+ positionTry?: Globals | StringToMultiple<PositionTry> | String
101
+ positionTryFallback?: Globals | 'none' | StringToMultiple<PositionTry> | String
102
+ positionTryOrder?: Globals | 'normal' | 'most-width' | 'most-height' | 'most-block-size' | 'most-inline-size'
103
+ positionVisibility?: Globals | 'always' | 'anchors-visible' | 'no-overflow'
104
+ textWrapMode?: Globals | 'wrap' | 'nowrap'
105
+ textSpacingTrim?: Globals | 'normal' | 'space-all' | 'space-first' | 'trim-start'
106
+ textWrapStyle?: Globals | 'auto' | 'balance' | 'pretty' | 'stable'
107
+ }
108
+
25
109
  export type CssProperty = keyof PropertiesFallback
26
110
 
27
- export interface CssProperties extends PropertiesFallback<String | Number>, CssVarProperties {}
111
+ export interface CssProperties extends PropertiesFallback<String | Number>, CssVarProperties, ModernCssProperties {}
28
112
 
29
113
  export interface CssKeyframes {
30
114
  [name: string]: {
@@ -46,7 +130,7 @@ interface GenericProperties {
46
130
 
47
131
  export type NestedCssProperties = Nested<CssProperties>
48
132
 
49
- export type SystemStyleObject = Nested<SystemProperties & CssVarProperties>
133
+ export type SystemStyleObject = Omit<Nested<SystemProperties & CssVarProperties>, 'base'>
50
134
 
51
135
  export interface GlobalStyleObject {
52
136
  [selector: string]: SystemStyleObject
@@ -56,12 +140,33 @@ export interface ExtendableGlobalStyleObject {
56
140
  extend?: GlobalStyleObject | undefined
57
141
  }
58
142
 
143
+ /* -----------------------------------------------------------------------------
144
+ * Composition (text styles, layer styles)
145
+ * -----------------------------------------------------------------------------*/
146
+
59
147
  type FilterStyleObject<P extends string> = {
60
148
  [K in P]?: K extends keyof SystemStyleObject ? SystemStyleObject[K] : unknown
61
149
  }
62
150
 
63
151
  export type CompositionStyleObject<Property extends string> = Nested<FilterStyleObject<Property> & CssVarProperties>
64
152
 
153
+ /* -----------------------------------------------------------------------------
154
+ * Font face
155
+ * -----------------------------------------------------------------------------*/
156
+
157
+ export type GlobalFontfaceRule = Omit<AtRule.FontFaceFallback, 'src'> & Required<Pick<AtRule.FontFaceFallback, 'src'>>
158
+
159
+ export type FontfaceRule = Omit<GlobalFontfaceRule, 'fontFamily'>
160
+
161
+ export interface GlobalFontface {
162
+ [name: string]: FontfaceRule | FontfaceRule[]
163
+ }
164
+
165
+ export interface ExtendableGlobalFontface {
166
+ [name: string]: FontfaceRule | FontfaceRule[] | GlobalFontface | undefined
167
+ extend?: GlobalFontface | undefined
168
+ }
169
+
65
170
  /* -----------------------------------------------------------------------------
66
171
  * Jsx style props
67
172
  * -----------------------------------------------------------------------------*/