@stamcat/craftsman 0.0.27-alpha.2 → 0.0.27-alpha.21
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/AGENTS.md +19 -344
- package/Components.esm.js +72 -11
- package/README.md +5 -0
- package/Styles.esm.js +7 -7
- package/Utilities.esm.js +2 -2
- package/_virtual/_rolldown/runtime.esm.js +18 -6
- package/package.json +75 -6
- package/src/components/Button/AGENTS.md +65 -0
- package/src/components/{Button.d.ts → Button/Button.d.ts} +1 -1
- package/src/components/Button/Button.esm.js +20 -0
- package/src/components/Carousel/AGENTS.md +41 -0
- package/src/components/Carousel/Carousel.css +1 -0
- package/src/components/Carousel/Carousel.d.ts +11 -0
- package/src/components/Carousel/Carousel.scss +34 -0
- package/src/components/Carousel/Carousel2.esm.js +75 -0
- package/src/components/Checkbox/AGENTS.md +34 -0
- package/src/components/Checkbox/Checkbox.d.ts +8 -0
- package/src/components/Checkbox/Checkbox.esm.js +18 -0
- package/src/components/DatePicker/AGENTS.md +36 -0
- package/src/components/DatePicker/DatePicker.css +1 -0
- package/src/components/DatePicker/DatePicker.d.ts +8 -0
- package/src/components/DatePicker/DatePicker.scss +61 -0
- package/src/components/DatePicker/DatePicker2.esm.js +29 -0
- package/src/components/DatePicker/ReactCalendar.css +1 -0
- package/src/components/DatePicker/ReactCalendar.scss +158 -0
- package/src/components/DatePicker/_DatePicker.scss +73 -0
- package/src/components/DateRangePicker/AGENTS.md +38 -0
- package/src/components/DateRangePicker/DateRangePicker.css +1 -0
- package/src/components/DateRangePicker/DateRangePicker.d.ts +8 -0
- package/src/components/DateRangePicker/DateRangePicker.scss +62 -0
- package/src/components/DateRangePicker/DateRangePicker2.esm.js +29 -0
- package/src/components/DateTimePicker/AGENTS.md +41 -0
- package/src/components/DateTimePicker/DateTimePicker.css +1 -0
- package/src/components/DateTimePicker/DateTimePicker.d.ts +13 -0
- package/src/components/DateTimePicker/DateTimePicker.scss +86 -0
- package/src/components/DateTimePicker/DateTimePicker2.esm.js +82 -0
- package/src/components/Icons/IconAmazonPay.d.ts +2 -0
- package/src/components/Icons/IconAmazonPay.esm.js +76 -0
- package/src/components/Icons/IconAmex.d.ts +2 -0
- package/src/components/Icons/IconAmex.esm.js +87 -0
- package/src/components/Icons/IconApplePay.d.ts +2 -0
- package/src/components/Icons/IconApplePay.esm.js +26 -0
- package/src/components/Icons/IconDiscover.d.ts +2 -0
- package/src/components/Icons/IconDiscover.esm.js +129 -0
- package/src/components/Icons/IconGooglePay.d.ts +2 -0
- package/src/components/Icons/IconGooglePay.esm.js +64 -0
- package/src/components/Icons/IconMaestro.d.ts +2 -0
- package/src/components/Icons/IconMaestro.esm.js +38 -0
- package/src/components/Icons/IconMastercard.d.ts +2 -0
- package/src/components/Icons/IconMastercard.esm.js +27 -0
- package/src/components/Icons/IconPayPal.d.ts +2 -0
- package/src/components/Icons/IconPayPal.esm.js +52 -0
- package/src/components/Icons/IconSepa.d.ts +2 -0
- package/src/components/Icons/IconSepa.esm.js +272 -0
- package/src/components/Icons/IconShopPay.d.ts +2 -0
- package/src/components/Icons/IconShopPay.esm.js +35 -0
- package/src/components/Icons/IconSquare.d.ts +2 -0
- package/src/components/Icons/IconSquare.esm.js +11 -0
- package/src/components/Icons/IconStripe.d.ts +2 -0
- package/src/components/Icons/IconStripe.esm.js +57 -0
- package/src/components/Icons/IconUnionPay.d.ts +2 -0
- package/src/components/Icons/IconUnionPay.esm.js +28 -0
- package/src/components/Icons/IconVenmo.d.ts +2 -0
- package/src/components/Icons/IconVenmo.esm.js +21 -0
- package/src/components/Icons/IconVisa.d.ts +2 -0
- package/src/components/Icons/IconVisa.esm.js +14 -0
- package/src/components/Icons/index.d.ts +15 -0
- package/src/components/Icons/index.esm.js +16 -0
- package/src/components/Icons/types.d.ts +4 -0
- package/src/components/Input/AGENTS.md +30 -0
- package/src/components/Input/Input.css +1 -0
- package/src/components/Input/Input.d.ts +6 -0
- package/src/components/Input/Input.scss +176 -0
- package/src/components/Input/Input2.esm.js +42 -0
- package/src/components/Input/InputWrapper.d.ts +11 -0
- package/src/components/Input/InputWrapper.esm.js +22 -0
- package/src/components/InputNumber/AGENTS.md +37 -0
- package/src/components/InputNumber/InputNumber.css +1 -0
- package/src/components/InputNumber/InputNumber.d.ts +10 -0
- package/src/components/InputNumber/InputNumber.scss +29 -0
- package/src/components/InputNumber/InputNumber2.esm.js +36 -0
- package/src/components/InputPassword/AGENTS.md +29 -0
- package/src/components/{InputPassword.d.ts → InputPassword/InputPassword.d.ts} +2 -2
- package/src/components/InputPassword/InputPassword.esm.js +30 -0
- package/src/components/InputPhone/AGENTS.md +35 -0
- package/src/components/InputPhone/InputPhone.css +1 -0
- package/src/components/InputPhone/InputPhone.d.ts +7 -0
- package/src/components/InputPhone/InputPhone.scss +266 -0
- package/src/components/InputPhone/InputPhone2.esm.js +27 -0
- package/src/components/Loader/AGENTS.md +31 -0
- package/src/components/{Loader.d.ts → Loader/Loader.d.ts} +1 -2
- package/src/components/Loader/Loader.esm.js +19 -0
- package/src/components/Loader/loaders.module.css +1 -0
- package/src/components/Loader/loaders.module.esm.js +21 -0
- package/src/{styles/global/components → components/Loader}/loaders.module.scss +2 -1
- package/src/components/Modal/AGENTS.md +47 -0
- package/src/components/Modal/Modal.css +1 -0
- package/src/components/{Modal.d.ts → Modal/Modal.d.ts} +0 -1
- package/src/components/Modal/Modal.scss +150 -0
- package/src/components/Modal/Modal2.esm.js +53 -0
- package/src/components/Notice/AGENTS.md +42 -0
- package/src/components/Notice/Notice.css +1 -0
- package/src/components/Notice/Notice.d.ts +13 -0
- package/src/components/Notice/Notice.scss +76 -0
- package/src/components/Notice/Notice2.esm.js +56 -0
- package/src/components/Pagination/AGENTS.md +38 -0
- package/src/components/Pagination/Pagination.css +1 -0
- package/src/components/Pagination/Pagination.d.ts +10 -0
- package/src/components/Pagination/Pagination.scss +22 -0
- package/src/components/Pagination/Pagination2.esm.js +64 -0
- package/src/components/RadioButton/AGENTS.md +44 -0
- package/src/components/RadioButton/RadioButton.d.ts +9 -0
- package/src/components/RadioButton/RadioButton.esm.js +18 -0
- package/src/components/Select/AGENTS.md +36 -0
- package/src/components/Select/Select.d.ts +14 -0
- package/src/components/Select/Select.esm.js +26 -0
- package/src/components/SortableList/AGENTS.md +45 -0
- package/src/components/SortableList/ListItem.d.ts +10 -0
- package/src/components/SortableList/ListItem.esm.js +67 -0
- package/src/components/SortableList/SortableList.css +1 -0
- package/src/components/SortableList/SortableList.d.ts +23 -0
- package/src/components/SortableList/SortableList.scss +41 -0
- package/src/components/SortableList/SortableList2.esm.js +54 -0
- package/src/components/SortableList/utilities.d.ts +7 -0
- package/src/components/SortableList/utilities.esm.js +4 -0
- package/src/components/Text/AGENTS.md +32 -0
- package/src/components/Text/Text.css +1 -0
- package/src/components/Text/Text.d.ts +10 -0
- package/src/components/Text/Text.scss +80 -0
- package/src/components/Text/Text2.esm.js +23 -0
- package/src/components/Textarea/AGENTS.md +32 -0
- package/src/components/Textarea/Textarea.d.ts +3 -0
- package/src/components/Textarea/Textarea.esm.js +23 -0
- package/src/components/TimePicker/AGENTS.md +42 -0
- package/src/components/TimePicker/TimePicker.css +1 -0
- package/src/components/TimePicker/TimePicker.d.ts +13 -0
- package/src/components/TimePicker/TimePicker.scss +226 -0
- package/src/components/TimePicker/TimePicker2.esm.js +98 -0
- package/src/components/TimePicker/TimePickerDisplay.d.ts +16 -0
- package/src/components/TimePicker/TimePickerDisplay.esm.js +54 -0
- package/src/components/TimePicker/TimePickerWheel.d.ts +13 -0
- package/src/components/TimePicker/TimePickerWheel.esm.js +61 -0
- package/src/components/TimePicker/constants.d.ts +7 -0
- package/src/components/TimePicker/constants.esm.js +3 -0
- package/src/components/TimePicker/utilities.d.ts +15 -0
- package/src/components/TimePicker/utilities.esm.js +20 -0
- package/src/components/Toggle/AGENTS.md +33 -0
- package/src/components/Toggle/Toggle.css +1 -0
- package/src/components/Toggle/Toggle.d.ts +5 -0
- package/src/components/Toggle/Toggle.scss +64 -0
- package/src/components/Toggle/Toggle2.esm.js +19 -0
- package/src/components/Tooltip/AGENTS.md +41 -0
- package/src/components/Tooltip/Tooltip.css +1 -0
- package/src/components/Tooltip/Tooltip.d.ts +12 -0
- package/src/components/Tooltip/Tooltip.scss +29 -0
- package/src/components/Tooltip/Tooltip2.esm.js +65 -0
- package/src/components/index.d.ts +23 -7
- package/src/stories/assets/Stam.jpg +0 -0
- package/src/stories/assets/kaluah.jpg +0 -0
- package/src/stories/assets/stam2.jpg +0 -0
- package/src/stories/assets/tito.jpg +0 -0
- package/src/stories/documentation/AboutUs.mdx +21 -0
- package/src/stories/documentation/GettingStarted.mdx +117 -0
- package/src/stories/documentation/Introduction.mdx +29 -0
- package/src/stories/documentation/Themes.mdx +264 -0
- package/src/stories/documentation/ToDo.mdx +15 -0
- package/src/stories/molecules/Carousel.scss +21 -0
- package/src/stories/utilities/DeviceDetection.mdx +59 -0
- package/src/styles/_config.scss +30 -0
- package/src/styles/components/ThemeProvider.esm.js +1 -1
- package/src/styles/global/components/_button.scss +56 -52
- package/src/styles/global/components/_checkbox.scss +64 -59
- package/src/styles/global/components/_code.scss +19 -15
- package/src/styles/global/components/_input.scss +29 -37
- package/src/styles/global/components/_radioButton.scss +30 -26
- package/src/styles/global/components/_select.scss +56 -0
- package/src/styles/global/components/_typography.scss +97 -6
- package/src/styles/global/globalStyles.module.scss +1 -129
- package/src/styles/global/globalStyles.scss +87 -1
- package/src/styles/index.d.ts +1 -1
- package/src/styles/theme/components.esm.js +11 -7
- package/src/styles/theme/theme.esm.js +31 -41
- package/src/styles/theme/types.d.ts +4 -1
- package/src/styles/utilities/_functions.scss +117 -0
- package/src/styles/utilities/_mixins.scss +0 -0
- package/src/styles/utilities/_placeholders.scss +6 -0
- package/src/styles/utilities/color.d.ts +1 -1
- package/src/styles/utilities/constants.d.ts +1 -1
- package/src/styles/utilities/layout.d.ts +1 -1
- package/src/styles/utilities/layout.esm.js +3 -3
- package/src/{styles/utilities → utilities}/types.d.ts +61 -3
- package/src/utilities/types.esm.js +85 -0
- package/src/utilities/validations.d.ts +5 -0
- package/src/utilities/validations.esm.js +19 -1
- package/src/components/Button.esm.js +0 -28
- package/src/components/Button.module.css +0 -1
- package/src/components/Button.module.esm.js +0 -9
- package/src/components/Button.module.scss +0 -5
- package/src/components/Checkbox.d.ts +0 -7
- package/src/components/Checkbox.esm.js +0 -11
- package/src/components/Input.d.ts +0 -11
- package/src/components/Input.esm.js +0 -41
- package/src/components/Input.module.css +0 -1
- package/src/components/Input.module.esm.js +0 -11
- package/src/components/Input.module.scss +0 -141
- package/src/components/InputPassword.esm.js +0 -33
- package/src/components/Loader.esm.js +0 -21
- package/src/components/Modal.esm.js +0 -62
- package/src/components/Modal.module.css +0 -1
- package/src/components/Modal.module.esm.js +0 -13
- package/src/components/Modal.module.scss +0 -133
- package/src/components/RadioButton.d.ts +0 -7
- package/src/components/RadioButton.esm.js +0 -11
- package/src/styles/global/components/_mixins.scss +0 -2
- package/src/styles/global/components/button.d.ts +0 -7
- package/src/styles/global/components/loaders.module.css +0 -1
- package/src/styles/global/components/loaders.module.esm.js +0 -21
- package/src/styles/utilities/types.esm.js +0 -54
- package/src/{styles/global/components/loaders.d.ts → components/Loader/types.d.ts} +1 -1
- /package/src/{styles/global/components/loaders.esm.js → components/Loader/types.esm.js} +0 -0
- /package/src/components/{Progress.d.ts → Progress/Progress.d.ts} +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@use "../../styles/utilities/_functions" as u;
|
|
2
|
+
|
|
3
|
+
@layer craftsman-component {
|
|
4
|
+
.sortable-list {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
gap: #{u.width("gutter", 0.25)};
|
|
8
|
+
margin: 0;
|
|
9
|
+
padding: 0;
|
|
10
|
+
list-style: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.sortable-list-item {
|
|
14
|
+
position: relative;
|
|
15
|
+
cursor: grab;
|
|
16
|
+
transition: transform 200ms ease, opacity 150ms ease;
|
|
17
|
+
|
|
18
|
+
&.dragging {
|
|
19
|
+
opacity: 0.4;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&.drop-top::before,
|
|
23
|
+
&.drop-bottom::after {
|
|
24
|
+
content: "";
|
|
25
|
+
position: absolute;
|
|
26
|
+
left: 0;
|
|
27
|
+
right: 0;
|
|
28
|
+
height: 2px;
|
|
29
|
+
border-radius: 1px;
|
|
30
|
+
background-color: #{u.color("blue500")};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&.drop-top::before {
|
|
34
|
+
top: -1px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.drop-bottom::after {
|
|
38
|
+
bottom: -1px;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { monitorForElements as e } from "../../../node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/element-adapter.esm.js";
|
|
3
|
+
import { reorder as t } from "../../../node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/reorder.esm.js";
|
|
4
|
+
import './SortableList.css';/* empty css */
|
|
5
|
+
import { isItemData as n } from "./utilities.esm.js";
|
|
6
|
+
import { SortableListItem as r } from "./ListItem.esm.js";
|
|
7
|
+
import i from "clsx";
|
|
8
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
9
|
+
import { useEffect as o, useId as s } from "react";
|
|
10
|
+
//#region src/components/SortableList/SortableList.tsx
|
|
11
|
+
var c = ({ items: c, getKey: l, renderItem: u, onReorder: d, disabled: f, className: p, style: m, listId: h, onReceive: g }) => {
|
|
12
|
+
let _ = s(), v = h ?? _, y = (e, n) => {
|
|
13
|
+
let r = c.findIndex((t, n) => l(t, n) === e), i = c.findIndex((e, t) => l(e, t) === n);
|
|
14
|
+
r === -1 || i === -1 || r === i || d(t({
|
|
15
|
+
list: c,
|
|
16
|
+
startIndex: r,
|
|
17
|
+
finishIndex: i
|
|
18
|
+
}));
|
|
19
|
+
}, b = (e) => {
|
|
20
|
+
let t = c.findIndex((t, n) => l(t, n) === e);
|
|
21
|
+
t !== -1 && d(c.filter((e, n) => n !== t));
|
|
22
|
+
}, x = (e, t) => {
|
|
23
|
+
let n = c.findIndex((e, n) => l(e, n) === t);
|
|
24
|
+
g?.(e, n === -1 ? c.length : n);
|
|
25
|
+
};
|
|
26
|
+
return o(() => {
|
|
27
|
+
if (!f) return e({ onDrop: ({ source: e, location: t }) => {
|
|
28
|
+
let r = t.current.dropTargets[0];
|
|
29
|
+
if (!r || !n(e.data) || !n(r.data)) return;
|
|
30
|
+
let i = e.data.listId, a = r.data.listId, o = i === v, s = a === v;
|
|
31
|
+
o && s ? y(e.data.key, r.data.key) : o ? b(e.data.key) : s && g && x(e.data.item, r.data.key);
|
|
32
|
+
} });
|
|
33
|
+
}, [
|
|
34
|
+
c,
|
|
35
|
+
l,
|
|
36
|
+
d,
|
|
37
|
+
f,
|
|
38
|
+
v,
|
|
39
|
+
g
|
|
40
|
+
]), /* @__PURE__ */ a("ul", {
|
|
41
|
+
className: i("sortable-list", p),
|
|
42
|
+
style: m,
|
|
43
|
+
children: c.map((e, t) => /* @__PURE__ */ a(r, {
|
|
44
|
+
item: e,
|
|
45
|
+
index: t,
|
|
46
|
+
getKey: l,
|
|
47
|
+
renderItem: u,
|
|
48
|
+
disabled: f,
|
|
49
|
+
listId: v
|
|
50
|
+
}, l(e, t)))
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
//#endregion
|
|
54
|
+
export { c as SortableList };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Text — Agent Usage Notes
|
|
2
|
+
|
|
3
|
+
Import:
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { Text } from "@stamcat/craftsman/Text";
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Props:
|
|
10
|
+
|
|
11
|
+
- Inherits all native HTML element props.
|
|
12
|
+
- `as?: TextTags` — HTML tag to render (default: `"div"`)
|
|
13
|
+
- `richText?: boolean` — when `true`, renders sanitized HTML from a string `children` value (always renders as `<div>`)
|
|
14
|
+
- `type?: TextType` — overrides base type styling (e.g. `"display"`, `"heading"`)
|
|
15
|
+
- `size?: TextSize` — overrides base size styling
|
|
16
|
+
- `alignment?: "center" | "left" | "right"` — legacy text-align shorthand
|
|
17
|
+
|
|
18
|
+
Behavior notes:
|
|
19
|
+
|
|
20
|
+
- Uses global HTML5 tag declarations by default; `type` and `size` override base styling.
|
|
21
|
+
- `richText` mode sanitizes HTML via DOMPurify. Always pass a string as `children` in this mode.
|
|
22
|
+
- Prefer semantic HTML5 tags via `as` over using `type`/`size` overrides.
|
|
23
|
+
|
|
24
|
+
Example:
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
// Semantic heading
|
|
28
|
+
<Text as="h2">Section Title</Text>
|
|
29
|
+
|
|
30
|
+
// Sanitized rich text from a CMS
|
|
31
|
+
<Text richText>{'<p><strong>Hello</strong> world</p>'}</Text>
|
|
32
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer craftsman-base{h1{font-size:calc(var(--w-text) * 3.125);margin:0 0 var(--w-gutter) 0;line-height:1.2}h2{font-size:calc(var(--w-text) * 2.625);margin:0 0 var(--w-gutter) 0;font-weight:625;line-height:1.1}h3{font-size:calc(var(--w-text) * 1.625);margin:0 0 calc(var(--w-gutter) * .75) 0;line-height:1.1}h4{font-size:calc(var(--w-text) * 1.25);margin:0 0 calc(var(--w-gutter) * .5) 0;line-height:1.1}h5{font-size:var(--w-text);margin:0 0 calc(var(--w-gutter) * .5) 0;line-height:1.2}h6{font-size:calc(var(--w-text) * .875);margin:0;font-weight:600;line-height:1.2}p{font-style:normal;font-size:var(--w-text);margin:0;line-height:1.5}small{font-size:calc(var(--w-text) * .75)}@media (width<=660px){h4{font-size:var(--w-text,14px)}p{font-size:calc(var(--w-text,14px) * .875)}}}@layer craftsman-component{.text.display{font-size:calc(var(--w-text) * 1.625);margin:0 0 calc(var(--w-gutter) * .75) 0;line-height:1.1}.text.display.xlarge{font-size:calc(var(--w-text) * 3.125);margin:0 0 var(--w-gutter) 0;line-height:1.2}.text.display.large{font-size:calc(var(--w-text) * 2.625);margin:0 0 var(--w-gutter) 0;font-weight:625;line-height:1.1}.text.display.small{font-size:calc(var(--w-text) * 1.25);margin:0 0 calc(var(--w-gutter) * .5) 0;line-height:1.1}.text.heading{font-size:calc(var(--w-text) * 1.625);margin:0 0 calc(var(--w-gutter) * .75) 0;line-height:1.1}.text.heading.xlarge{font-size:calc(var(--w-text) * 3.125);margin:0 0 var(--w-gutter) 0;line-height:1.2}.text.heading.large,.text.xlarge{font-size:calc(var(--w-text) * 2.625);margin:0 0 var(--w-gutter) 0;font-weight:625;line-height:1.1}.text.heading.medium{font-size:calc(var(--w-text) * 1.625);margin:0 0 calc(var(--w-gutter) * .75) 0;line-height:1.1}.text.heading.small{font-size:calc(var(--w-text) * 1.25);margin:0 0 calc(var(--w-gutter) * .5) 0;line-height:1.1}.text.heading.xsmall{font-size:var(--w-text);margin:0 0 calc(var(--w-gutter) * .5) 0;line-height:1.2}.text.paragraph{font-style:normal;font-size:var(--w-text);margin:0;line-height:1.5}.text.paragraph.xlarge,.text.large{font-size:calc(var(--w-text) * 1.625);margin:0 0 calc(var(--w-gutter) * .75) 0;line-height:1.1}.text.paragraph.large{font-size:calc(var(--w-text) * 1.25);margin:0 0 calc(var(--w-gutter) * .5) 0;line-height:1.1}.text.paragraph.medium,.text.medium{font-style:normal;font-size:var(--w-text);margin:0;line-height:1.5}.text.paragraph.small,.text.small{font-size:calc(var(--w-text) * .75)}.text.paragraph.xsmall,.text.xsmall{font-size:calc(var(--w-text) * .5)}.text.caption{font-size:calc(var(--w-text) * .75)}.text.center{text-align:center}.text.left{text-align:left}.text.right{text-align:right}}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TextSize } from 'storybook/theming';
|
|
2
|
+
import { TextTags, TextType } from '../../utilities/types';
|
|
3
|
+
export type TextProps = React.HTMLAttributes<HTMLElement> & {
|
|
4
|
+
as?: TextTags;
|
|
5
|
+
richText?: boolean;
|
|
6
|
+
type?: TextType;
|
|
7
|
+
size?: TextSize;
|
|
8
|
+
alignment?: "center" | "left" | "right";
|
|
9
|
+
};
|
|
10
|
+
export declare const Text: React.FC<TextProps>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
@use "../../styles/utilities/_functions" as u;
|
|
2
|
+
@use "../../styles/global/components/typography" as t;
|
|
3
|
+
@layer craftsman-component {
|
|
4
|
+
.text {
|
|
5
|
+
// --- display ---
|
|
6
|
+
&.display {
|
|
7
|
+
@include t.h3;
|
|
8
|
+
}
|
|
9
|
+
&.display.xlarge {
|
|
10
|
+
@include t.h1;
|
|
11
|
+
}
|
|
12
|
+
&.display.large {
|
|
13
|
+
@include t.h2;
|
|
14
|
+
}
|
|
15
|
+
&.display.small {
|
|
16
|
+
@include t.h4;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// --- heading ---
|
|
20
|
+
&.heading {
|
|
21
|
+
@include t.h3;
|
|
22
|
+
}
|
|
23
|
+
&.heading.xlarge {
|
|
24
|
+
@include t.h1;
|
|
25
|
+
}
|
|
26
|
+
&.heading.large,
|
|
27
|
+
&.xlarge {
|
|
28
|
+
@include t.h2;
|
|
29
|
+
}
|
|
30
|
+
&.heading.medium {
|
|
31
|
+
@include t.h3;
|
|
32
|
+
}
|
|
33
|
+
&.heading.small {
|
|
34
|
+
@include t.h4;
|
|
35
|
+
}
|
|
36
|
+
&.heading.xsmall {
|
|
37
|
+
@include t.h5;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// --- paragraph ---
|
|
41
|
+
&.paragraph {
|
|
42
|
+
@include t.p;
|
|
43
|
+
}
|
|
44
|
+
&.paragraph.xlarge,
|
|
45
|
+
&.large {
|
|
46
|
+
@include t.h3;
|
|
47
|
+
}
|
|
48
|
+
&.paragraph.large {
|
|
49
|
+
@include t.h4;
|
|
50
|
+
}
|
|
51
|
+
&.paragraph.medium,
|
|
52
|
+
&.medium {
|
|
53
|
+
@include t.p;
|
|
54
|
+
}
|
|
55
|
+
&.paragraph.small,
|
|
56
|
+
&.small {
|
|
57
|
+
@include t.small;
|
|
58
|
+
}
|
|
59
|
+
&.paragraph.xsmall,
|
|
60
|
+
&.xsmall {
|
|
61
|
+
@include t.xsmall;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// --- caption ---
|
|
65
|
+
&.caption {
|
|
66
|
+
@include t.small;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// --- alignment ---
|
|
70
|
+
&.center {
|
|
71
|
+
text-align: center;
|
|
72
|
+
}
|
|
73
|
+
&.left {
|
|
74
|
+
text-align: left;
|
|
75
|
+
}
|
|
76
|
+
&.right {
|
|
77
|
+
text-align: right;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import './Text.css';/* empty css */
|
|
2
|
+
import e from "clsx";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import n from "dompurify";
|
|
5
|
+
//#region src/components/Text/Text.tsx
|
|
6
|
+
var r = ({ as: r = "div", children: i, type: a, size: o, className: s, alignment: c, richText: l, ...u }) => {
|
|
7
|
+
let d = e(a && a, o && o, c && c, "text", s);
|
|
8
|
+
if (l) {
|
|
9
|
+
let e = typeof i == "string" ? n.sanitize(i, { ADD_ATTR: ["target"] }) : i;
|
|
10
|
+
return /* @__PURE__ */ t("div", {
|
|
11
|
+
...u,
|
|
12
|
+
className: d,
|
|
13
|
+
dangerouslySetInnerHTML: { __html: e || "" }
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return /* @__PURE__ */ t(r, {
|
|
17
|
+
...u,
|
|
18
|
+
className: d,
|
|
19
|
+
children: i
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { r as Text };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Textarea — Agent Usage Notes
|
|
2
|
+
|
|
3
|
+
Import:
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { Textarea } from "@stamcat/craftsman/Textarea";
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Props:
|
|
10
|
+
|
|
11
|
+
- Inherits all native `<textarea>` props.
|
|
12
|
+
- `label?: string | ReactNode`
|
|
13
|
+
- `labelPosition?: "top" | "left" | "bottom" | "right" | "inside" | "hidden"` (default: `"top"`)
|
|
14
|
+
- `error?: string | boolean | ReactNode`
|
|
15
|
+
- `required?: boolean`
|
|
16
|
+
- `rows?: number`
|
|
17
|
+
|
|
18
|
+
Behavior notes:
|
|
19
|
+
|
|
20
|
+
- Shares the same `InputWrapper` as `Input` — label, error, and required behavior is identical.
|
|
21
|
+
- `id` is auto-generated via `useId` if not provided.
|
|
22
|
+
|
|
23
|
+
Example:
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
<Textarea
|
|
27
|
+
label="Your Message"
|
|
28
|
+
placeholder="Type here"
|
|
29
|
+
rows={4}
|
|
30
|
+
required
|
|
31
|
+
/>
|
|
32
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { InputWrapper as e } from "../Input/InputWrapper.esm.js";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import { useId as n } from "react";
|
|
5
|
+
//#region src/components/Textarea/Textarea.tsx
|
|
6
|
+
var r = ({ labelPosition: r = "top", id: i, label: a, error: o, required: s, className: c, style: l, ...u }) => {
|
|
7
|
+
let d = n();
|
|
8
|
+
return /* @__PURE__ */ t(e, {
|
|
9
|
+
label: a,
|
|
10
|
+
className: c,
|
|
11
|
+
labelPosition: r,
|
|
12
|
+
error: o,
|
|
13
|
+
required: s,
|
|
14
|
+
style: l,
|
|
15
|
+
children: /* @__PURE__ */ t("textarea", {
|
|
16
|
+
id: i || d,
|
|
17
|
+
className: "input",
|
|
18
|
+
...u
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { r as Textarea };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# TimePicker — Agent Usage Notes
|
|
2
|
+
|
|
3
|
+
Import:
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { TimePicker } from "@stamcat/craftsman/TimePicker";
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Props:
|
|
10
|
+
|
|
11
|
+
- Extends `TimePickerProps` from `react-time-picker`, excluding its `locale` and `format` props.
|
|
12
|
+
- `label?: string | ReactNode`
|
|
13
|
+
- `labelPosition?: "top" | "left" | "bottom" | "right" | "inside" | "hidden"` (default: `"top"`)
|
|
14
|
+
- `error?: string | boolean | ReactNode`
|
|
15
|
+
- `required?: boolean`
|
|
16
|
+
- `locale?: Intl.LocalesArgument`
|
|
17
|
+
- `format?: 24 | 12`
|
|
18
|
+
- `labels?: { hour?: string; minute?: string }`
|
|
19
|
+
|
|
20
|
+
Behavior notes:
|
|
21
|
+
|
|
22
|
+
- The component uses a custom wheel UI instead of the stock `react-time-picker` clock popup.
|
|
23
|
+
- `value` is typically a time string such as `"09:30"`; pair it with `onChange` for interactive controlled usage.
|
|
24
|
+
- If a `value` is provided without `onChange`, treat the picker as effectively read-only.
|
|
25
|
+
- Focusing the input opens the wheel, and the trailing toggle button shows or hides it explicitly.
|
|
26
|
+
- The trailing toggle button mirrors the field's `disabled` prop — when `disabled` is set, the toggle is disabled too.
|
|
27
|
+
- Clicking outside the field and wheel closes the wheel.
|
|
28
|
+
- `locale` defaults to the browser locale when omitted and affects time formatting and wheel labels.
|
|
29
|
+
- When `name` is provided, the component renders a hidden input so forms can submit the selected string value.
|
|
30
|
+
|
|
31
|
+
Example:
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
const [time, setTime] = useState("09:30");
|
|
35
|
+
|
|
36
|
+
<TimePicker
|
|
37
|
+
label="Appointment Time"
|
|
38
|
+
value={time}
|
|
39
|
+
onChange={(value) => setTime(value ?? "")}
|
|
40
|
+
format={24}
|
|
41
|
+
/>
|
|
42
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer craftsman-base{.react-time-picker__wrapper:focus{box-shadow:none;outline:0}.react-time-picker__wrapper{color:var(--text);border:1px solid var(--gray400);padding:calc(var(--w-gutter) * .5);background-color:var(--white);border-radius:6px}[type=number].react-time-picker__wrapper::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}[type=number].react-time-picker__wrapper::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}[type=number].react-time-picker__wrapper{appearance:textfield}.react-time-picker__wrapper:disabled,.disabled.react-time-picker__wrapper{border-color:var(--gray200);background-color:var(--gray100)}}.react-time-picker,.react-time-picker *,.react-time-picker :before,.react-time-picker :after{box-sizing:border-box}@layer craftsman-component{.react-time-picker{display:inline-flex;position:relative}.react-time-picker--disabled{color:#6d6d6d;background-color:#f0f0f0}.react-time-picker__wrapper{flex-grow:1;flex-shrink:0;padding:6px 8px;display:flex}.react-time-picker__inputGroup{box-sizing:content-box;flex-grow:1;padding:0 2px}.react-time-picker__inputGroup__divider{white-space:pre;padding:1px 0}.react-time-picker__inputGroup__divider,.react-time-picker__inputGroup__leadingZero{font:inherit;display:inline-block}.react-time-picker__inputGroup__input{text-align:center;color:currentColor;min-width:calc(2ch + 1px);height:calc(100% - 2px);font:inherit;box-sizing:content-box;appearance:textfield;background:0 0;border:0;padding:1px;position:relative}[name=year].react-time-picker__inputGroup__input{min-width:calc(4ch + 2px)}.react-time-picker__inputGroup__input:disabled{background-color:unset}.react-time-picker__inputGroup__input::-webkit-outer-spin-button{appearance:none;margin:0}.react-time-picker__inputGroup__input::-webkit-inner-spin-button{appearance:none;margin:0}.react-time-picker__inputGroup__input--hasLeadingZero{margin-left:-.54em;padding-left:calc(1px + .54em)}.react-time-picker__button{border:0;padding:4px 4px 4px 7px}.react-time-picker__button:hover{background:0 0}.react-time-picker__wrapper{padding:6px 24px 6px 8px}.react-time-picker__inputGroup__input:invalid{background:#ff00001a}.react-time-picker__inputGroup__amPm{font:inherit;appearance:menulist}.react-time-picker__button:enabled{cursor:pointer}.react-time-picker__button:enabled:hover .react-time-picker__button__icon,.react-time-picker__button:enabled:focus .react-time-picker__button__icon{stroke:#0078d7}.react-time-picker__button:disabled .react-time-picker__button__icon{stroke:#6d6d6d}.react-time-picker__button svg{display:inherit}.react-time-picker__clock{z-index:1;background-color:#fff;border:thin solid #a0a096;width:200px;max-width:100vw;height:200px;padding:25px}.react-time-picker__clock--closed,.timePicker .react-time-picker__clock{display:none}.timePicker .timePicker__field{position:relative}.timePicker .timePicker__field .input-view-toggle{padding:4px;line-height:1;position:absolute;top:50%;right:4px;transform:translateY(-50%)}.timePicker__display{background-color:var(--white);border:1px solid var(--gray400);z-index:1;border-radius:8px;height:160px;display:inline-flex;position:relative}.timePicker__display:before,.timePicker__display:after{content:"";z-index:1;pointer-events:none;height:calc(50% - 16px);display:block;position:absolute;left:0;right:0}.timePicker__display:before{border-bottom:.5px solid rgba(var(--text-high-contrast-rgb-value), .3);background:linear-gradient(to top, rgba(var(--background-site-rgb-value), .65) 0%, rgba(var(--background-site-rgb-value), 1) 100%);top:-.5px}.timePicker__display:after{border-top:.5px solid rgba(var(--text-high-contrast-rgb-value), .3);background:linear-gradient(to bottom, rgba(var(--background-site-rgb-value), .65) 0%, rgba(var(--background-site-rgb-value), 1) 100%);bottom:-.5px}.timePicker__display .ios-picker{flex-direction:row;align-items:center;gap:6px;height:100%;padding:0 12px;font-size:16px;line-height:1;display:flex}.timePicker__display .ios-picker--disabled{pointer-events:none;opacity:.5}.timePicker__display .ios-picker__scene{touch-action:pan-x;align-items:center;min-width:30px;height:100%;display:flex;overflow:hidden}.timePicker__display .ios-picker__viewport{perspective:1000px;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-khtml-user-select:none;-webkit-tap-highlight-color:transparent;width:100%;height:32px}.timePicker__display .ios-picker__viewport--perspective-left{perspective-origin:calc(50% + 130px);transform:translate(27px)}.timePicker__display .ios-picker__viewport--perspective-right{perspective-origin:calc(50% - 130px);transform:translate(-27px)}.timePicker__display .ios-picker__viewport--perspective-center{perspective-origin:50%}.timePicker__display .ios-picker__container{width:100%;height:100%;transform-style:preserve-3d;will-change:transform}.timePicker__display .ios-picker__slide{text-align:center;backface-visibility:hidden;opacity:0;justify-content:center;align-items:center;width:100%;height:100%;display:flex}.timePicker__display .ios-picker__label{white-space:nowrap;pointer-events:none;font-weight:700}}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TimePickerProps as ReactTimePickerProps } from 'react-time-picker';
|
|
3
|
+
import { LabeledInput } from '../Input/InputWrapper';
|
|
4
|
+
type TimePickerProps = Omit<ReactTimePickerProps, "locale" | "format"> & LabeledInput & {
|
|
5
|
+
locale?: Intl.LocalesArgument;
|
|
6
|
+
format?: 24 | 12;
|
|
7
|
+
labels?: {
|
|
8
|
+
hour?: string;
|
|
9
|
+
minute?: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare const TimePicker: React.FC<TimePickerProps>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
@use "../../styles/utilities/_functions" as u;
|
|
2
|
+
@use "../../styles/global/components/input";
|
|
3
|
+
@use "../../styles/utilities/_placeholders";
|
|
4
|
+
@use "../DatePicker/_DatePicker";
|
|
5
|
+
|
|
6
|
+
@layer craftsman-component {
|
|
7
|
+
.react-time-picker,
|
|
8
|
+
.react-time-picker *,
|
|
9
|
+
.react-time-picker *:before,
|
|
10
|
+
.react-time-picker *:after {
|
|
11
|
+
@extend %border-box;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.react-time-picker {
|
|
15
|
+
@extend %date-picker-styles;
|
|
16
|
+
&--disabled {
|
|
17
|
+
@extend %date-picker-disabled;
|
|
18
|
+
}
|
|
19
|
+
&__wrapper {
|
|
20
|
+
@extend %date-picker-wrapper;
|
|
21
|
+
padding: 6px 24px 6px 8px;
|
|
22
|
+
}
|
|
23
|
+
&__inputGroup {
|
|
24
|
+
@extend %date-picker-input-group;
|
|
25
|
+
}
|
|
26
|
+
&__inputGroup__divider {
|
|
27
|
+
@extend %date-picker-divider;
|
|
28
|
+
}
|
|
29
|
+
&__inputGroup__divider,
|
|
30
|
+
&__inputGroup__leadingZero {
|
|
31
|
+
@extend %date-picker-leading-zero-divider;
|
|
32
|
+
}
|
|
33
|
+
&__inputGroup__input {
|
|
34
|
+
@extend %date-picker-group-input;
|
|
35
|
+
}
|
|
36
|
+
&__inputGroup__input::-webkit-outer-spin-button,
|
|
37
|
+
&__inputGroup__input::-webkit-inner-spin-button {
|
|
38
|
+
@extend %date-picker-input-spinner;
|
|
39
|
+
}
|
|
40
|
+
&__inputGroup__input--hasLeadingZero {
|
|
41
|
+
@extend %date-picker-input-leading-zero;
|
|
42
|
+
}
|
|
43
|
+
&__button {
|
|
44
|
+
@extend %date-picker-button;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.react-time-picker__inputGroup__input:invalid {
|
|
49
|
+
background: rgba(255, 0, 0, 0.1);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.react-time-picker__inputGroup__amPm {
|
|
53
|
+
font: inherit;
|
|
54
|
+
-webkit-appearance: menulist;
|
|
55
|
+
-moz-appearance: menulist;
|
|
56
|
+
appearance: menulist;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.react-time-picker__button:enabled {
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.react-time-picker__button:enabled:hover .react-time-picker__button__icon,
|
|
64
|
+
.react-time-picker__button:enabled:focus .react-time-picker__button__icon {
|
|
65
|
+
stroke: #0078d7;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.react-time-picker__button:disabled .react-time-picker__button__icon {
|
|
69
|
+
stroke: #6d6d6d;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.react-time-picker__button svg {
|
|
73
|
+
display: inherit;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.react-time-picker__clock {
|
|
77
|
+
width: 200px;
|
|
78
|
+
height: 200px;
|
|
79
|
+
max-width: 100vw;
|
|
80
|
+
padding: 25px;
|
|
81
|
+
background-color: white;
|
|
82
|
+
border: thin solid #a0a096;
|
|
83
|
+
z-index: 1;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.react-time-picker__clock--closed {
|
|
87
|
+
display: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.timePicker {
|
|
91
|
+
// suppress the built-in clock popup — our custom wheel renders instead
|
|
92
|
+
.react-time-picker__clock {
|
|
93
|
+
display: none;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.timePicker__field {
|
|
97
|
+
position: relative;
|
|
98
|
+
|
|
99
|
+
.input-view-toggle {
|
|
100
|
+
position: absolute;
|
|
101
|
+
right: 4px;
|
|
102
|
+
top: 50%;
|
|
103
|
+
transform: translateY(-50%);
|
|
104
|
+
padding: 4px;
|
|
105
|
+
line-height: 1;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&__display {
|
|
110
|
+
position: relative;
|
|
111
|
+
display: inline-flex;
|
|
112
|
+
height: 160px;
|
|
113
|
+
background-color: #{u.color("white")};
|
|
114
|
+
border: 1px solid #{u.color("gray400")};
|
|
115
|
+
border-radius: 8px;
|
|
116
|
+
z-index: 1;
|
|
117
|
+
&:before,
|
|
118
|
+
&:after {
|
|
119
|
+
position: absolute;
|
|
120
|
+
left: 0;
|
|
121
|
+
right: 0;
|
|
122
|
+
content: "";
|
|
123
|
+
display: block;
|
|
124
|
+
height: calc(50% - 32px / 2);
|
|
125
|
+
z-index: 1;
|
|
126
|
+
pointer-events: none;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&:before {
|
|
130
|
+
top: -0.5px;
|
|
131
|
+
border-bottom: 0.5px solid rgba(var(--text-high-contrast-rgb-value), 0.3);
|
|
132
|
+
background: linear-gradient(
|
|
133
|
+
to top,
|
|
134
|
+
rgba(var(--background-site-rgb-value), 0.65) 0%,
|
|
135
|
+
rgba(var(--background-site-rgb-value), 1) 100%
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&:after {
|
|
140
|
+
bottom: -0.5px;
|
|
141
|
+
border-top: 0.5px solid rgba(var(--text-high-contrast-rgb-value), 0.3);
|
|
142
|
+
background: linear-gradient(
|
|
143
|
+
to bottom,
|
|
144
|
+
rgba(var(--background-site-rgb-value), 0.65) 0%,
|
|
145
|
+
rgba(var(--background-site-rgb-value), 1) 100%
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.ios-picker {
|
|
150
|
+
height: 100%;
|
|
151
|
+
display: flex;
|
|
152
|
+
flex-direction: row;
|
|
153
|
+
align-items: center;
|
|
154
|
+
gap: 6px;
|
|
155
|
+
padding: 0 12px;
|
|
156
|
+
line-height: 1;
|
|
157
|
+
font-size: 16px;
|
|
158
|
+
|
|
159
|
+
&--disabled {
|
|
160
|
+
pointer-events: none;
|
|
161
|
+
opacity: 0.5;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.ios-picker__scene {
|
|
166
|
+
min-width: 30px;
|
|
167
|
+
height: 100%;
|
|
168
|
+
overflow: hidden;
|
|
169
|
+
display: flex;
|
|
170
|
+
align-items: center;
|
|
171
|
+
touch-action: pan-x;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.ios-picker__viewport {
|
|
175
|
+
height: 32px;
|
|
176
|
+
width: 100%;
|
|
177
|
+
perspective: 1000px;
|
|
178
|
+
-webkit-user-select: none;
|
|
179
|
+
-moz-user-select: none;
|
|
180
|
+
-ms-user-select: none;
|
|
181
|
+
user-select: none;
|
|
182
|
+
-webkit-touch-callout: none;
|
|
183
|
+
-khtml-user-select: none;
|
|
184
|
+
-webkit-tap-highlight-color: transparent;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.ios-picker__viewport--perspective-left {
|
|
188
|
+
perspective-origin: calc(50% + 130px) 50%;
|
|
189
|
+
transform: translateX(27px);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.ios-picker__viewport--perspective-right {
|
|
193
|
+
perspective-origin: calc(50% - 130px) 50%;
|
|
194
|
+
transform: translateX(-27px);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.ios-picker__viewport--perspective-center {
|
|
198
|
+
perspective-origin: 50% 50%;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.ios-picker__container {
|
|
202
|
+
height: 100%;
|
|
203
|
+
width: 100%;
|
|
204
|
+
transform-style: preserve-3d;
|
|
205
|
+
will-change: transform;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.ios-picker__slide {
|
|
209
|
+
width: 100%;
|
|
210
|
+
height: 100%;
|
|
211
|
+
text-align: center;
|
|
212
|
+
display: flex;
|
|
213
|
+
align-items: center;
|
|
214
|
+
justify-content: center;
|
|
215
|
+
backface-visibility: hidden;
|
|
216
|
+
opacity: 0;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.ios-picker__label {
|
|
220
|
+
font-weight: 700;
|
|
221
|
+
white-space: nowrap;
|
|
222
|
+
pointer-events: none;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|