@kushagradhawan/kookie-ui 0.1.120 → 0.1.122

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 (45) hide show
  1. package/components.css +41 -3
  2. package/dist/cjs/components/card.d.ts.map +1 -1
  3. package/dist/cjs/components/card.js +1 -1
  4. package/dist/cjs/components/card.js.map +3 -3
  5. package/dist/cjs/components/card.props.d.ts +4 -0
  6. package/dist/cjs/components/card.props.d.ts.map +1 -1
  7. package/dist/cjs/components/card.props.js +1 -1
  8. package/dist/cjs/components/card.props.js.map +2 -2
  9. package/dist/cjs/components/sheet.d.ts +7 -6
  10. package/dist/cjs/components/sheet.d.ts.map +1 -1
  11. package/dist/cjs/components/sheet.js +1 -1
  12. package/dist/cjs/components/sheet.js.map +3 -3
  13. package/dist/cjs/components/toolbar.d.ts +5 -6
  14. package/dist/cjs/components/toolbar.d.ts.map +1 -1
  15. package/dist/cjs/components/toolbar.js +1 -1
  16. package/dist/cjs/components/toolbar.js.map +3 -3
  17. package/dist/esm/components/card.d.ts.map +1 -1
  18. package/dist/esm/components/card.js +1 -1
  19. package/dist/esm/components/card.js.map +3 -3
  20. package/dist/esm/components/card.props.d.ts +4 -0
  21. package/dist/esm/components/card.props.d.ts.map +1 -1
  22. package/dist/esm/components/card.props.js +1 -1
  23. package/dist/esm/components/card.props.js.map +2 -2
  24. package/dist/esm/components/sheet.d.ts +7 -6
  25. package/dist/esm/components/sheet.d.ts.map +1 -1
  26. package/dist/esm/components/sheet.js +1 -1
  27. package/dist/esm/components/sheet.js.map +3 -3
  28. package/dist/esm/components/toolbar.d.ts +5 -6
  29. package/dist/esm/components/toolbar.d.ts.map +1 -1
  30. package/dist/esm/components/toolbar.js +1 -1
  31. package/dist/esm/components/toolbar.js.map +3 -3
  32. package/package.json +1 -1
  33. package/schemas/base-button.json +1 -1
  34. package/schemas/button.json +1 -1
  35. package/schemas/icon-button.json +1 -1
  36. package/schemas/index.json +6 -6
  37. package/schemas/toggle-button.json +1 -1
  38. package/schemas/toggle-icon-button.json +1 -1
  39. package/src/components/_internal/base-card.css +14 -0
  40. package/src/components/card.props.tsx +2 -0
  41. package/src/components/card.tsx +2 -1
  42. package/src/components/sheet.tsx +23 -16
  43. package/src/components/toolbar.css +51 -5
  44. package/src/components/toolbar.tsx +16 -24
  45. package/styles.css +41 -3
@@ -6,7 +6,7 @@ import { Flex } from './flex.js';
6
6
  import { Heading } from './heading.js';
7
7
 
8
8
  import type { CardProps } from './card.js';
9
- import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';
9
+ import type { FlexProps } from './flex.js';
10
10
 
11
11
  // ============================================================================
12
12
  // Toolbar Root
@@ -115,15 +115,9 @@ const ToolbarRoot = React.forwardRef<ToolbarRootElement, ToolbarRootProps>(
115
115
  style={computedStyle}
116
116
  {...restProps}
117
117
  >
118
- <Flex
119
- align="center"
120
- justify="between"
121
- direction={isHorizontal ? 'row' : 'column'}
122
- gap="2"
123
- className="rt-ToolbarInner"
124
- >
118
+ <div className="rt-ToolbarInner">
125
119
  {children}
126
- </Flex>
120
+ </div>
127
121
  </Card>
128
122
  );
129
123
  },
@@ -135,15 +129,14 @@ ToolbarRoot.displayName = 'Toolbar.Root';
135
129
  // ============================================================================
136
130
 
137
131
  type ToolbarSectionElement = React.ElementRef<'div'>;
138
- interface ToolbarSectionProps extends ComponentPropsWithout<'div', RemovedProps> {}
132
+ type ToolbarSectionProps = FlexProps;
139
133
 
140
134
  const ToolbarLeft = React.forwardRef<ToolbarSectionElement, ToolbarSectionProps>(
141
- ({ className, children, ...props }, forwardedRef) => (
135
+ ({ gap = '2', align = 'center', className, children, ...props }, forwardedRef) => (
142
136
  <Flex
143
137
  ref={forwardedRef}
144
- align="center"
145
- gap="2"
146
- flexShrink="0"
138
+ align={align}
139
+ gap={gap}
147
140
  className={classNames('rt-ToolbarSection', 'rt-ToolbarLeft', className)}
148
141
  {...props}
149
142
  >
@@ -158,13 +151,12 @@ ToolbarLeft.displayName = 'Toolbar.Left';
158
151
  // ============================================================================
159
152
 
160
153
  const ToolbarCenter = React.forwardRef<ToolbarSectionElement, ToolbarSectionProps>(
161
- ({ className, children, ...props }, forwardedRef) => (
154
+ ({ gap = '2', align = 'center', justify = 'center', className, children, ...props }, forwardedRef) => (
162
155
  <Flex
163
156
  ref={forwardedRef}
164
- align="center"
165
- justify="center"
166
- flexGrow="1"
167
- minWidth="0"
157
+ align={align}
158
+ justify={justify}
159
+ gap={gap}
168
160
  className={classNames('rt-ToolbarSection', 'rt-ToolbarCenter', className)}
169
161
  {...props}
170
162
  >
@@ -179,12 +171,12 @@ ToolbarCenter.displayName = 'Toolbar.Center';
179
171
  // ============================================================================
180
172
 
181
173
  const ToolbarRight = React.forwardRef<ToolbarSectionElement, ToolbarSectionProps>(
182
- ({ className, children, ...props }, forwardedRef) => (
174
+ ({ gap = '2', align = 'center', justify = 'end', className, children, ...props }, forwardedRef) => (
183
175
  <Flex
184
176
  ref={forwardedRef}
185
- align="center"
186
- gap="2"
187
- flexShrink="0"
177
+ align={align}
178
+ justify={justify}
179
+ gap={gap}
188
180
  className={classNames('rt-ToolbarSection', 'rt-ToolbarRight', className)}
189
181
  {...props}
190
182
  >
@@ -202,7 +194,7 @@ type ToolbarTitleElement = React.ElementRef<typeof Heading>;
202
194
  interface ToolbarTitleProps extends React.ComponentPropsWithoutRef<typeof Heading> {}
203
195
 
204
196
  const ToolbarTitle = React.forwardRef<ToolbarTitleElement, ToolbarTitleProps>(
205
- ({ className, size = '3', weight = 'medium', truncate = true, children, ...props }, forwardedRef) => (
197
+ ({ className, size = '2', weight = 'medium', truncate = true, children, ...props }, forwardedRef) => (
206
198
  <Heading
207
199
  ref={forwardedRef}
208
200
  size={size}
package/styles.css CHANGED
@@ -10233,6 +10233,12 @@
10233
10233
  --base-card-border-radius: min(var(--radius-9), calc(var(--radius-5) + var(--space-5)));
10234
10234
  }
10235
10235
  }
10236
+ .rt-BaseCard:where([data-inset='true']){
10237
+ --base-card-padding-top: 0px;
10238
+ --base-card-padding-right: 0px;
10239
+ --base-card-padding-bottom: 0px;
10240
+ --base-card-padding-left: 0px;
10241
+ }
10236
10242
  .rt-BaseCard:where(.rt-variant-outline){
10237
10243
  --card-border-width: 1px;
10238
10244
  --card-background-color: transparent;
@@ -25026,8 +25032,34 @@
25026
25032
  z-index: 1;
25027
25033
  }
25028
25034
  .rt-ToolbarInner{
25035
+ display: grid;
25036
+ grid-template-columns: 1fr auto 1fr;
25037
+ align-items: center;
25029
25038
  width: 100%;
25030
25039
  height: 100%;
25040
+ gap: var(--space-2);
25041
+ }
25042
+ .rt-Toolbar:where([data-anchor='left'], [data-anchor='right']) .rt-ToolbarInner{
25043
+ grid-template-columns: 1fr;
25044
+ grid-template-rows: 1fr auto 1fr;
25045
+ }
25046
+ .rt-Toolbar:where([data-anchor='left'], [data-anchor='right']) .rt-ToolbarLeft{
25047
+ grid-column: 1;
25048
+ grid-row: 1;
25049
+ align-self: start;
25050
+ justify-self: center;
25051
+ }
25052
+ .rt-Toolbar:where([data-anchor='left'], [data-anchor='right']) .rt-ToolbarCenter{
25053
+ grid-column: 1;
25054
+ grid-row: 2;
25055
+ align-self: center;
25056
+ justify-self: center;
25057
+ }
25058
+ .rt-Toolbar:where([data-anchor='left'], [data-anchor='right']) .rt-ToolbarRight{
25059
+ grid-column: 1;
25060
+ grid-row: 3;
25061
+ align-self: end;
25062
+ justify-self: center;
25031
25063
  }
25032
25064
  .rt-Toolbar:where([data-anchor='top']){
25033
25065
  top: 0;
@@ -25087,14 +25119,20 @@
25087
25119
  min-width: 0;
25088
25120
  flex-shrink: 1;
25089
25121
  }
25122
+ .rt-ToolbarSection{
25123
+ min-width: 0;
25124
+ }
25090
25125
  .rt-ToolbarLeft{
25091
- justify-content: flex-start;
25126
+ grid-column: 1;
25127
+ justify-self: start;
25092
25128
  }
25093
25129
  .rt-ToolbarCenter{
25094
- justify-content: center;
25130
+ grid-column: 2;
25131
+ justify-self: center;
25095
25132
  }
25096
25133
  .rt-ToolbarRight{
25097
- justify-content: flex-end;
25134
+ grid-column: 3;
25135
+ justify-self: end;
25098
25136
  }
25099
25137
  .rt-TooltipContent{
25100
25138
  box-sizing: border-box;