@kushagradhawan/kookie-ui 0.1.6 → 0.1.8
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/components.css +40 -0
- package/dist/cjs/components/image.d.ts +21 -0
- package/dist/cjs/components/image.d.ts.map +1 -0
- package/dist/cjs/components/image.js +2 -0
- package/dist/cjs/components/image.js.map +7 -0
- package/dist/cjs/components/image.props.d.ts +33 -0
- package/dist/cjs/components/image.props.d.ts.map +1 -0
- package/dist/cjs/components/image.props.js +2 -0
- package/dist/cjs/components/image.props.js.map +7 -0
- package/dist/cjs/components/index.d.ts +1 -0
- package/dist/cjs/components/index.d.ts.map +1 -1
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/toggle-icon-button.d.ts +20 -19
- package/dist/cjs/components/toggle-icon-button.d.ts.map +1 -1
- package/dist/cjs/components/toggle-icon-button.js +1 -1
- package/dist/cjs/components/toggle-icon-button.js.map +3 -3
- package/dist/cjs/props/index.d.ts +2 -0
- package/dist/cjs/props/index.d.ts.map +1 -1
- package/dist/cjs/props/index.js +1 -1
- package/dist/cjs/props/index.js.map +2 -2
- package/dist/cjs/props/shadow.props.d.ts +24 -0
- package/dist/cjs/props/shadow.props.d.ts.map +1 -0
- package/dist/cjs/props/shadow.props.js +2 -0
- package/dist/cjs/props/shadow.props.js.map +7 -0
- package/dist/esm/components/image.d.ts +21 -0
- package/dist/esm/components/image.d.ts.map +1 -0
- package/dist/esm/components/image.js +2 -0
- package/dist/esm/components/image.js.map +7 -0
- package/dist/esm/components/image.props.d.ts +33 -0
- package/dist/esm/components/image.props.d.ts.map +1 -0
- package/dist/esm/components/image.props.js +2 -0
- package/dist/esm/components/image.props.js.map +7 -0
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +3 -3
- package/dist/esm/components/toggle-icon-button.d.ts +20 -19
- package/dist/esm/components/toggle-icon-button.d.ts.map +1 -1
- package/dist/esm/components/toggle-icon-button.js +1 -1
- package/dist/esm/components/toggle-icon-button.js.map +2 -2
- package/dist/esm/props/index.d.ts +2 -0
- package/dist/esm/props/index.d.ts.map +1 -1
- package/dist/esm/props/index.js +1 -1
- package/dist/esm/props/index.js.map +2 -2
- package/dist/esm/props/shadow.props.d.ts +24 -0
- package/dist/esm/props/shadow.props.d.ts.map +1 -0
- package/dist/esm/props/shadow.props.js +2 -0
- package/dist/esm/props/shadow.props.js.map +7 -0
- package/package.json +1 -1
- package/src/components/image.css +52 -0
- package/src/components/image.props.ts +33 -0
- package/src/components/image.tsx +62 -0
- package/src/components/index.css +1 -0
- package/src/components/index.tsx +1 -0
- package/src/components/text.css +1 -0
- package/src/components/toggle-icon-button.tsx +34 -61
- package/src/props/index.ts +2 -0
- package/src/props/shadow.props.ts +30 -0
- package/styles.css +40 -0
package/src/props/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from './leading-trim.prop.js';
|
|
|
12
12
|
export * from './margin.props.js';
|
|
13
13
|
export * from './padding.props.js';
|
|
14
14
|
export * from './radius.prop.js';
|
|
15
|
+
export * from './shadow.props.js';
|
|
15
16
|
export * from './text-align.prop.js';
|
|
16
17
|
export * from './text-wrap.prop.js';
|
|
17
18
|
export * from './truncate.prop.js';
|
|
@@ -42,6 +43,7 @@ export * from '../components/grid.props.js';
|
|
|
42
43
|
export * from '../components/heading.props.js';
|
|
43
44
|
export * from '../components/hover-card.props.js';
|
|
44
45
|
export * from '../components/icon-button.props.js';
|
|
46
|
+
export * from '../components/image.props.js';
|
|
45
47
|
export * from '../components/inset.props.js';
|
|
46
48
|
export * from '../components/kbd.props.js';
|
|
47
49
|
export * from '../components/link.props.js';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { PropDef, GetPropDefTypes } from './prop-def.js';
|
|
2
|
+
|
|
3
|
+
const shadowValues = ['1', '2', '3', '4', '5', '6'] as const;
|
|
4
|
+
|
|
5
|
+
const shadowPropDefs = {
|
|
6
|
+
/**
|
|
7
|
+
* Sets the CSS **box-shadow** property using design system shadow tokens.
|
|
8
|
+
* Supports shadow scale values and responsive objects.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* shadow="3"
|
|
12
|
+
* shadow={{ sm: '2', lg: '4' }}
|
|
13
|
+
*
|
|
14
|
+
* @link
|
|
15
|
+
* https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow
|
|
16
|
+
*/
|
|
17
|
+
shadow: {
|
|
18
|
+
type: 'enum',
|
|
19
|
+
className: 'rt-r-shadow',
|
|
20
|
+
values: shadowValues,
|
|
21
|
+
responsive: true,
|
|
22
|
+
},
|
|
23
|
+
} satisfies {
|
|
24
|
+
shadow: PropDef<(typeof shadowValues)[number]>;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
type ShadowProps = GetPropDefTypes<typeof shadowPropDefs>;
|
|
28
|
+
|
|
29
|
+
export { shadowPropDefs };
|
|
30
|
+
export type { ShadowProps };
|
package/styles.css
CHANGED
|
@@ -5375,6 +5375,7 @@
|
|
|
5375
5375
|
}
|
|
5376
5376
|
}
|
|
5377
5377
|
.rt-Text {
|
|
5378
|
+
font-family: var(--default-font-family);
|
|
5378
5379
|
line-height: var(--line-height, var(--default-line-height));
|
|
5379
5380
|
letter-spacing: var(--letter-spacing, inherit);
|
|
5380
5381
|
}
|
|
@@ -10697,6 +10698,45 @@
|
|
|
10697
10698
|
--icon-button-ghost-padding: var(--space-3);
|
|
10698
10699
|
}
|
|
10699
10700
|
}
|
|
10701
|
+
.rt-Image {
|
|
10702
|
+
display: block;
|
|
10703
|
+
object-fit: var(--object-fit);
|
|
10704
|
+
box-shadow: var(--box-shadow);
|
|
10705
|
+
border-radius: max(var(--radius-3), var(--radius-full));
|
|
10706
|
+
}
|
|
10707
|
+
.rt-r-fit-cover {
|
|
10708
|
+
--object-fit: cover;
|
|
10709
|
+
}
|
|
10710
|
+
.rt-r-fit-contain {
|
|
10711
|
+
--object-fit: contain;
|
|
10712
|
+
}
|
|
10713
|
+
.rt-r-fit-fill {
|
|
10714
|
+
--object-fit: fill;
|
|
10715
|
+
}
|
|
10716
|
+
.rt-r-fit-scale-down {
|
|
10717
|
+
--object-fit: scale-down;
|
|
10718
|
+
}
|
|
10719
|
+
.rt-r-fit-none {
|
|
10720
|
+
--object-fit: none;
|
|
10721
|
+
}
|
|
10722
|
+
.rt-r-shadow-1 {
|
|
10723
|
+
--box-shadow: var(--shadow-1);
|
|
10724
|
+
}
|
|
10725
|
+
.rt-r-shadow-2 {
|
|
10726
|
+
--box-shadow: var(--shadow-2);
|
|
10727
|
+
}
|
|
10728
|
+
.rt-r-shadow-3 {
|
|
10729
|
+
--box-shadow: var(--shadow-3);
|
|
10730
|
+
}
|
|
10731
|
+
.rt-r-shadow-4 {
|
|
10732
|
+
--box-shadow: var(--shadow-4);
|
|
10733
|
+
}
|
|
10734
|
+
.rt-r-shadow-5 {
|
|
10735
|
+
--box-shadow: var(--shadow-5);
|
|
10736
|
+
}
|
|
10737
|
+
.rt-r-shadow-6 {
|
|
10738
|
+
--box-shadow: var(--shadow-6);
|
|
10739
|
+
}
|
|
10700
10740
|
.rt-Inset {
|
|
10701
10741
|
box-sizing: border-box;
|
|
10702
10742
|
--margin-top: 0px;
|